在路径:DexPathList上找不到类“ com.apps.mobileapps.androidx”

时间:2019-11-03 16:15:14

标签: android androidx android-multidex

在运行我的android应用程序时出现此错误消息,它似乎与多重删除有关,因为它试图在我的DexPathList中查找类并失败

2019-11-03 23:10:02.965 13828-13828/com.apps.mobileapps/LoadedApk: Unable to instantiate appComponentFactory
    java.lang.ClassNotFoundException: Didn't find class "com.apps.mobileapps.androidx" on path: DexPathList[[zip file "/data/app/com.apps.mobileapps-muEimjMtTACdHZQnV9kDoQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.apps.mobileapps-muEimjMtTACdHZQnV9kDoQ==/lib/arm64, /data/app/com.apps.mobileapps-muEimjMtTACdHZQnV9kDoQ==/base.apk!/lib/arm64-v8a, /system/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.LoadedApk.createAppFactory(LoadedApk.java:228)
        at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:733)
        at android.app.LoadedApk.getClassLoader(LoadedApk.java:812)
        at android.app.LoadedApk.getResources(LoadedApk.java:1034)
        at android.app.ContextImpl.createAppContext(ContextImpl.java:2357)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5821)
        at android.app.ActivityThread.access$1200(ActivityThread.java:200)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:201)
        at android.app.ActivityThread.main(ActivityThread.java:6810)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

1 个答案:

答案 0 :(得分:0)

尝试强制即时运行

有时问题是AndroidStudio倾向于使用“即时运行”,而不是编译和安装新的APK。

禁用即时运行 from File -> Settings -> Build,Execution, Deployment -> Instant Run