在路径上没有找到类“androidx.multidex.MultiDexApplication":DexPathList 在较低的 API <= 19 设备上 [英] Didn&#39;t find class “androidx.multidex.MultiDexApplication” on path: DexPathList on lower API &lt;= 19 devices

查看:79
本文介绍了在路径上没有找到类“androidx.multidex.MultiDexApplication":DexPathList 在较低的 API <= 19 设备上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的应用添加 Multidex support.但我收到一个错误:

I'm trying to add Multidex support to my app. But I get an error:

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo: java.lang.ClassNotFoundException: Didn't find class "androidx.multidex.MultiDexApplication" on path: DexPathList[[zip       file "/data/app/com.dfn.partner-2.apk"],nativeLibraryDirectories[/data/app-lib/se.android-2, /vendor/lib, /system/lib]]

我的gradle有:

defaultConfig {
   multiDexEnabled true
}

depenencies {
   ...
   implementation 'androidx.multidex:multidex:2.0.1'
   ...
}

我的 AndroidManifest.xml 有:

My AndroidManifest.xml have :

<application
  android:name="androidx.multidex.MultiDexApplication"
  ... >
...
</application>

可能有什么问题?

推荐答案

我在添加 multidex 后出现此错误,直到我清理:

I got this error after adding multidex until I cleaned:

./gradlew clean

这篇关于在路径上没有找到类“androidx.multidex.MultiDexApplication":DexPathList 在较低的 API <= 19 设备上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆