V
V
Vanes Ri_Lax2017-05-05 12:58:37
Android
Vanes Ri_Lax, 2017-05-05 12:58:37

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

Copy to the phone and install through the file manager, the application does not start and the following error comes out:
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

What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
7
7365656c65, 2017-05-05
@73656c6565

File Manifest AndroidManifest.xml, Maine and classes in the studio please!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question