다른 프래그먼트를 삽입하려고합니다. 처음이 일하고하지만 난 조각에게 응용 프로그램 충돌을 다시로드려고 할 때, 나는이 오류가 : 이것은 내 조각이다이진 XML 파일 라인 # 26 : ID, 태그 null 또는 상위 ID를 다른 프래그먼트와 중복합니다.
Caused by: java.lang.IllegalArgumentException: Binary XML file line #26:
Duplicate id 0x7f0e00e2, tag null, or parent id 0xffffffff with another
fragment for com.google.android.gms.location.places.ui.PlaceAutocompleteFragment
것은
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.source_destination,container, false);
PlaceAutocompleteFragment sourcr_autocompleteFragment = (PlaceAutocompleteFragment)
getActivity().getFragmentManager()
.findFragmentById(R.id.sourcr_autocomplete_fragment);
return rootView;
// List item
}
이 내 XML
입니다<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:padding="10dp"
android:background="@color/colorPrimary"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium"
android:layout_marginBottom="@dimen/margin_medium">
<fragment
android:id="@+id/sourcr_autocomplete_fragment"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
</LinearLayout>
이 게시물에서 제안한 내용을 시도해 보셨습니까? http://stackoverflow.com/questions/14083950/duplicate-id-tag-null-or-parent-id-with-another-fragment-for-com-google-androi?answertab=votes#tab-top – Dus
예 , 이미 그것을 확인하지만, 아무 use.here는 XML에서 조각을 사용하고 있으므로 작동하지 않습니다 – Rgv
마침내 내가 조각에 조각을 사용하지 마십시오. 그래서 PlaceAutocomplete 활동으로 이동 한 다음 내 문제를 해결했습니다. 모든 지원을 감사합니다. – Rgv