从Android工作室通过adb运行apk时,它正在正常运行/运行。但是,当我给我的客户端调试apk时,它崩溃了。但是当我给签名的apk时,它工作正常。
调试apk安装成功,但是当它运行时,它会得到"类未找到错误"。
09-19 20:05:12.065 29019-29019/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.volansys.homebridge, PID: 29019
java.lang.RuntimeException: Unable to instantiate application com.volansys.homebridge.HomeBridgeApplication: java.lang.ClassNotFoundException: Didn't find class "com.volansys.homebridge.HomeBridgeApplication" on path: DexPathList[[zip file "/data/app/com.volansys.homebridge-2/base.apk"],nativeLibraryDirectories=[/data/app/com.volansys.homebridge-2/lib/arm, /system/lib, /vendor/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:802)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5376)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.volansys.homebridge.HomeBridgeApplication" on path: DexPathList[[zip file "/data/app/com.volansys.homebridge-2/base.apk"],nativeLibraryDirectories=[/data/app/com.volansys.homebridge-2/lib/arm, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.Instrumentation.newApplication(Instrumentation.java:1014)
at android.app.LoadedApk.makeApplication(LoadedApk.java:796)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5376)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6123)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
我还更改了清单文件,并给出了应用程序类的整个路径,如
机器人:名称=" package_name.HomeBridgeApplication"
当我按ctrl +点击这个课程时,它可以导航到这个课程。这意味着路径是正确的,为什么我得到课程没有找到错误?
谁能帮助我吗? 在此先感谢。