java.lang.ClassNotFoundException: Didn‘t find class “###“ on path: DexPathList

项目场景:

例如:项目场景:使用AS开发时,项目中引用了封装的aar或者第三方aar文件 并且项目使用了AndroidX时APP闪退问题,报错信息如下:

java.lang.ClassNotFoundException: Didn‘t find class “###“ on path: DexPathList_第1张图片报错信息截图大概如下

问题描述

Caused by: java.lang.ClassNotFoundException:Didn't find class "com.xxx.xxx" on path: DexPathList;Caused by: java.lang.ClassNotFoundException: Didn't find class "com.xxx.xxx" on path: DexPathList, Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList

大意为找不到文件app运行闪退

原因分析:

提示:这里填写表示Android插件会通过重写其二进制文件来自动迁移现有的第三方库,以使用AndroidX依赖项;未设置时默认为false;问题的分析:


解决方案:

项目gradle.properties文件中添加:
android.enableJetifier=true

再次编译部署,闪退问题消失;

你可能感兴趣的:(Android开发问题记录,android,android-studio,gradle,java,aar)