【发布时间】:2020-09-04 13:22:37
【问题描述】:
我有以下布局:
<androidx.fragment.app.FragmentContainerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/map"
tools:context=".map.MapActivity"
android:name="com.google.android.gms.maps.SupportMapFragment" />
它适用于我的调试版本,但我的发布版本启用了 minify 崩溃了。
09-04 15:14:06.727 15555 15555 E AndroidRuntime: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class androidx.fragment.app.FragmentContainerView
09-04 15:14:06.727 15555 15555 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class androidx.fragment.app.FragmentContainerView
09-04 15:14:06.727 15555 15555 E AndroidRuntime: Caused by: androidx.fragment.app.Fragment$c: Unable to instantiate fragment com.google.android.gms.maps.SupportMapFragment: make sure class name exists
关于如何修复它的任何建议?如果我用旧的片段视图替换FragmentContainerView,它就可以工作。
【问题讨论】:
-
appcompat 1.2.0 版是否也有同样的问题(我在升级到 1.3.0 后看到了这个崩溃)
标签: android android-layout androidx