Duplicate ID, tag null, or parent id with another fragment for com.google.android.gms.maps.MapFragment

前端 未结 23 2055
-上瘾入骨i
-上瘾入骨i 2020-11-22 00:25

I have an application with three tabs.

Each tab has its own layout .xml file. The main.xml has its own map fragment. It\'s the one that shows up when the application

23条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 01:10

    Anyone coming here now that's getting this type of error when opening a Dialog or other Fragment with the Google Places AutocompleteSupportFragment, try this one-liner (I don't know how safe this is but it works for me):

    autocompleteFragment.getFragmentManager().beginTransaction().remove(autocompleteFragment).commit();

    before you dismiss/destroy your fragment.

提交回复
热议问题