嗨我试图在受限制的帐户上午餐,但它在启动时一直在崩溃。所以我把它安装在第二个帐户并获得它的日志。
01-07 14:16:29.357 11690 11690 E AndroidRuntime: FATAL EXCEPTION: main
01-07 14:16:29.357 11690 11690 E AndroidRuntime: Process: com.persian.zarareader, PID: 11690
01-07 14:16:29.357 11690 11690 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.persian.zarareader/com.persian.zarareader.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.persian.zarareader.MainActivity" on path: DexPathList[[zip file "/data/app/com.persian.zarareader-1/base.apk"],nativeLibraryDirectories=[/data/app/com.persian.zarareader-1/lib/arm64, /vendor/lib64, /system/lib64]]
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2477)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:111)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.os.Looper.loop(Looper.java:207)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5728)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.persian.zarareader.MainActivity" on path: DexPathList[[zip file "/data/app/com.persian.zarareader-1/base.apk"],nativeLibraryDirectories=[/data/app/com.persian.zarareader-1/lib/arm64, /vendor/lib64, /system/lib64]]
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1072)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2467)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: ... 9 more
01-07 14:16:29.357 11690 11690 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.persian.zarareader.MainActivity
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at java.lang.Class.classForName(Native Method)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
01-07 14:16:29.357 11690 11690 E AndroidRuntime: ... 12 more
01-07 14:16:29.357 11690 11690 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
该应用程序在主要用户上工作正常,但我需要让它在限制的用户中工作。到目前为止没有用! Android版本是5,任何帮助将不胜感激
答案 0 :(得分:0)
你的APK没有正确,为什么会出现崩溃和错误。 首先清理项目,然后构建APK。 安装在设备完成构建APK过程后。