运行我的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)
最佳答案
尝试禁用即时运行
有时问题是Android Studio尝试使用“即时运行”,而不是编译和安装新的APK。
禁用即时运行from File -> Settings -> Build,Execution, Deployment -> Instant Run
关于android - 在路径:DexPathList上找不到类“com.apps.mobileapps.androidx”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/58682073/