2
 <fragment
        android:id="@+id/place_autocomplete_fragment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
        />

public class MapFragmnet extends Fragment
{

 @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        View mapView= inflater.inflate(R.layout.fragmnet_map, container, false);
  PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)
                actvity.getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
return mapView;
}

Through navigation view, i am trying launch again the fragment, getting crash..

logcat :

   Caused by: java.lang.IllegalArgumentException: Binary XML file line #7: Duplicate id 0x7f0d00c3, tag null, or parent id 0xffffffff with another fragment for com.google.android.gms.location.places.ui.PlaceAutocompleteFragment
                                                                 at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2205)
                                                                 at android.app.FragmentController.onCreateView(FragmentController.java:98)
                                                                 at android.app.Activity.onCreateView(Activity.java:5559)
                                                                 at android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(BaseFragmentActivityHoneycomb.java:36)
                                                                 at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:75)

Can anybody please help me out...

update : addded the logcat output.
Kumar Kalluri
  • 493
  • 2
  • 6
  • 26

0 Answers0