Activity class does not exist (Error type 3)

匿名 (未验证) 提交于 2019-12-03 01:27:01

问题:

I have a device nexus5x with android O and i develop an app in my laptop and also in another computer. But when i want to start the app in another computer after i have started it in my laptop i always get error described below.

Error while executing: am start -n "com.safetylink.android.safetylinkheartbeatapp/com.application.aware.safetylink.auth.SplashScreenActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.safetylink.android.safetylinkheartbeatapp/com.application.aware.safetylink.auth.SplashScreenActivity } Error type 3 Error: Activity class {com.safetylink.android.safetylinkheartbeatapp/com.application.aware.safetylink.auth.SplashScreenActivity} does not exist.  Error while Launching activity 

It's a magic for me, because i don't have the same problem with another phones (it's just being reinstalled) and with emulator. Application works fine on them.

I think it's related to nexus5x settings, but i don't know exactly. What should i do, to fix this problem?

P.S.: I have already tryed to clean, rebuild project, rename activity, invalidate cache and restart for several times, also disable instance run, but it doesn't work for me.

回答1:

On some devices (LG Stylus 3 Android 7.0) when you press and move app from desktop to trash can the app does not removed from device. You can restore app trashed by this way later without reinstalling it from Google Play. If it is your case you may see this error:

Error while executing: am start -n "ru.alanov.cashbox/ru.alanov.cashbox.activity.LoginActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.your.app/.activity.MainActivity } Error type 3 Error: Activity class {ru.alanov.cashbox/com.your.app.activity.MainActivity} does not exist.  Error while Launching activity 

when trying to reinstall app from Android Studio thru ADB. Go to Settings -> Applications -> Click on your app and delete it. After it error disappears.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!