android studioを利用し、アプリを作成しているのですが、ビルドした際に
「Success: Operation succeeded」と表示されるのにもかかわらず、
android端末に一瞬だけアプリが開かれる様な描写が描かれたと思えば、
すぐにアプリが閉じてしまいます。
logcatを確認したところ以下の様なエラー文が表示されており、一応
「Unable to instantiate activity ComponentInfo」
「java.lang.ClassNotFoundException: Didn't find class "com.example.clientapp2.MainActivity"」
などのエラーについては調べてみたのですが、いまいち理解が出来ませんでした。
何が原因なのか、どう操作すればいいのかご教授頂けないでしょうか。
logcat
120-12-28 15:29:24.715 6130-6130/? E/mple.clientapp: Unknown bits set in runtime_flags: 0x8000 22020-12-28 15:29:25.186 6130-6130/com.example.clientapp2 E/AndroidRuntime: FATAL EXCEPTION: main 3 Process: com.example.clientapp2, PID: 6130 4 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.clientapp2/com.example.clientapp2.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.clientapp2.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.clientapp2-0-UI3PUm1NgC7dN2PoyEHw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.clientapp2-0-UI3PUm1NgC7dN2PoyEHw==/lib/arm64, /system/lib64, /product/lib64]] 5 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3226) 6 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3475) 7 at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 8 at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 9 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 10 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2039) 11 at android.os.Handler.dispatchMessage(Handler.java:107) 12 at android.os.Looper.loop(Looper.java:214) 13 at android.app.ActivityThread.main(ActivityThread.java:7626) 14 at java.lang.reflect.Method.invoke(Native Method) 15 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503) 16 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 17 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.clientapp2.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.clientapp2-0-UI3PUm1NgC7dN2PoyEHw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.clientapp2-0-UI3PUm1NgC7dN2PoyEHw==/lib/arm64, /system/lib64, /product/lib64]] 18 at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196) 19 at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 20 at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 21 at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95) 22 at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45) 23 at android.app.Instrumentation.newActivity(Instrumentation.java:1250) 24 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3213) 25 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3475) 26 at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) 27 at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 28 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 29 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2039) 30 at android.os.Handler.dispatchMessage(Handler.java:107) 31 at android.os.Looper.loop(Looper.java:214) 32 at android.app.ActivityThread.main(ActivityThread.java:7626) 33 at java.lang.reflect.Method.invoke(Native Method) 34 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503) 35 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
回答1件
あなたの回答
tips
プレビュー