老哥们,如果你的项目迭代了好几个大的版本,我建议你先不要去兼容AndroidX。
第一遍修改完之后是这个样子的。
<androidx.constraintlayout.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.ConstraintLayout>
闪退日志
android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.constraintlayout.ConstraintLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.ConstraintLayout" on path: DexPathList[[zip file "/data/app/com.supe.supertest-lCmJ9tQEBeCH09BSy-fiZw==/base.apk"],nativeLibraryDirectories=[/data/app/com.supe.supertest-lCmJ9tQEBeCH09BSy-fiZw==/lib/arm64, /data/app/com.supe.supertest-lCmJ9tQEBeCH09BSy-fiZw==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
原因是 这个才是 ConstraintLayout 真正的包名。
androidx.constraintlayout.widget.ConstraintLayout
嘎嘎嘎
最后
以上就是如意春天最近收集整理的关于兼容AndroidX闪退的全部内容,更多相关兼容AndroidX闪退内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复