Android - android.view.InflateException: Binary XML file line #: Error inflating class fragment

来源:互联网 发布:立讯精密 知乎 编辑:程序博客网 时间:2024/05/17 20:29

第二次总是崩溃,这次找到解决方法了



So if it crashes after opening the fragment second time. All you need is this in OnDestroy

@Overridepublic void onDestroy() {    super.onDestroy();    getFragmentManager().beginTransaction().remove(mapfragmentnamehere).commit();}

Make what changes you need if you're using support fragment

0 0
原创粉丝点击