gpt4 book ai didi

android - 无法实例化应用程序 - java.lang.ClassNotFoundException : Didn't find class "com.xxxxx.App" on path:/data/app/com. xxxxx-1.apk

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:36:52 25 4
gpt4 key购买 nike

这是我每次运行应用程序时的错误:

    E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate application com.xxxxx.App: java.lang.ClassNotFoundException: Didn't find class "com.xxxxx.App" on path: /data/app/com.xxxxx-1.apk
at android.app.LoadedApk.makeApplication(LoadedApk.java:509)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4657)
at android.app.ActivityThread.access$1400(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.xxxxx.App" on path: /data/app/com.xxxxx-1.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newApplication(Instrumentation.java:992)
at android.app.LoadedApk.makeApplication(LoadedApk.java:504)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4657) 
at android.app.ActivityThread.access$1400(ActivityThread.java:159) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:176) 
at android.app.ActivityThread.main(ActivityThread.java:5419) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:525) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) 
at dalvik.system.NativeStart.main(Native Method)

这里有一些信息:

JavaVersion.VERSION_1_8        (I cannot use 1.7 because of a library)
buildToolsVersion '24.0.0'
compileSdkVersion & target 24 (also tried 23)
gradle 2.2.0-alpha4 (also tried with 2.1.0)

我有 instant run禁用。

我有一个名为 App 的类延伸 Application , 所以在 AndroidManifest.xml我有<application android:name="com.xxxxx.App"

请不要将这个问题标记为重复,因为我已经尝试了所有给出的解决方案,但我无法摆脱这个错误。

最佳答案

我遇到了同样的错误,只是清理项目就为我解决了。这似乎是新版本android studio中的一个错误。

关于android - 无法实例化应用程序 - java.lang.ClassNotFoundException : Didn't find class "com.xxxxx.App" on path:/data/app/com. xxxxx-1.apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38240812/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com