Answer the question
In order to leave comments, you need to log in
Why won't the app launch on my phone?
Hello, I wrote a simple application for educational purposes on android. Everything works fine on the emulator, I did debugging on the device, everything starts well.
But if you take the file at
android\MyApplication2\app\build\outputs\apk\app-debug.apk
05-05 14:51:15.487 20601-20601/ru.sekretoria.app.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
Process: ru.sekretoria.app.myapplication, PID: 20601
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{ru.sekretoria.app.myapplication/ru.sekretoria.app.myapplication.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "ru.sekretoria.app.myapplication.MainActivity" on path: DexPathList
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)
at android.app.ActivityThread.access$900(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5551)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by: java.lang.ClassNotFoundException: Didn't find class "ru.sekretoria.app.myapplication.MainActivity" on path: DexPathList
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2329)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)
at android.app.ActivityThread.access$900(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5551)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Suppressed: java.lang.ClassNotFoundException: ru.sekretoria.app.myapplication.MainActivity
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
Answer the question
In order to leave comments, you need to log in
File Manifest AndroidManifest.xml, Maine and classes in the studio please!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question