I just built my app and it started crashing without errors. I don't know why. I just rewrite the code from my testapp because there was missing 1 library file.
Here is my terminal :
11/23 14:14:32: Launching app
$ adb install-multiple -r -t -p com.tomsovec.smart2t C:\Users\TomKo\Desktop\SmartLock2T\app\build\intermediates\split-apk\debug\slices\slice_8.apk
Split APKs installed in 3 s 186 ms
$ adb shell am start -n "com.tomsovec.smart2t/com.tomsovec.smart2t.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 10196 on device Nexus_5X_API_28 [emulator-5554]
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/omsovec.smart2: JIT profile information will not be recorded: profile file does not exits.
I/chatty: uid=10087(com.tomsovec.smart2t) identical 10 lines
W/omsovec.smart2: JIT profile information will not be recorded: profile file does not exits.
I/InstantRun: starting instant run server: is main process
W/omsovec.smart2: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
I/omsovec.smart2: Background concurrent copying GC freed 25239(6MB) AllocSpace objects, 0(0B) LOS objects, 54% free, 1291KB/2MB, paused 1.439ms total 121.585ms
W/omsovec.smart2: JNI critical lock held for 19.414ms on Thread[1,tid=10196,Runnable,Thread*=0xe30f4000,peer=0x73a08760,"main"]
W/omsovec.smart2: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
W/omsovec.smart2: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
W/omsovec.smart2: Accessing hidden method Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic; (light greylist, linking)
W/omsovec.smart2: JNI critical lock held for 18.004ms on Thread[1,tid=10196,Runnable,Thread*=0xe30f4000,peer=0x73a08760,"main"]
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tomsovec.smart2t, PID: 10196
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.tomsovec.smart2t/com.tomsovec.smart2t.Login}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2005)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
at android.app.Activity.startActivityForResult(Activity.java:4586)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)
at android.app.Activity.startActivityForResult(Activity.java:4544)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663)
at android.app.Activity.startActivity(Activity.java:4905)
at android.app.Activity.startActivity(Activity.java:4873)
at com.tomsovec.smart2t.MainActivity.onStart(MainActivity.java:36)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391)
at android.app.Activity.performStart(Activity.java:7157)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2937)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/Process: Sending signal. PID: 10196 SIG: 9
Application terminated.
At the beginning it didn't crash (only sometimes when I logged in using database
The exception is self explanatory ActivityNotFoundException
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.tomsovec.smart2t/com.tomsovec.smart2t.Login};
have you declared this activity in your AndroidManifest.xml?
Unable to find explicit activity class, have you declared this activity in your AndroidManifest.xml?
So. Have you added this activity to your manifest?
<application
...
<activity
android:name=".Login" >
</activity>
</application>
Please check you application's manifest.xml if you have set com.tomsovec.smart2t.Login
as an activity.
The crash starts when you are trying to load your application.
Hey guys its me again... It fixed it but now when i try to load GUIMain.class it just load again Login.class and put some error to Terminal
(Stackovewflow didnt let me put the terminal here so if you want guys some information tell me) and thanks for help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.