> 文档中心 > java.lang.ClassNotFoundException: Didn‘t find class “###“ on path: DexPathList

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


项目场景:

提示:这里简述项目相关背景:

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

在这里插入图片描述

问题描述

Caused by: java.lang.ClassNotFoundException:Didn't find class "com.bytedance.sdk.openadsdk.TTFileProvider" on path: DexPathList;Caused by: java.lang.ClassNotFoundException: Didn't find class "com.baidu.mobads.sdk.api.BdFileProvider" 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

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

K歌软件