hi i`m trying to lunch my app on a restricted account but it keeps crashing at startup. so i installed it on second account and got the log for it.
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
the app is working fine on main user but i need to make it work in a restricted one. so far nothing worked! android version is 5 and any help would be much appreciated
Your APK not build Proper that why get crash and error. First you clean your project and then Build APK. install in device After complete build APK Process.