我有一个带有android O的设备nexus5x,我在我的笔记本电脑和另一台电脑上开发了一个应用程序。但是,当我在笔记本电脑上启动应用程序后,我想在另一台计算机上启动应用程序时,我总是会遇到下面描述的错误。
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
这对我来说是一个魔法,因为我没有其他手机(它只是被重新安装)和模拟器的同样问题。应用程序在他们身上工作得很好。
我认为它与nexus5x设置有关,但我不太清楚。我应该怎么做,来解决这个问题?
附言:我已经尝试过清理、重建项目、重命名活动、使缓存失效和重新启动几次,也禁用实例运行,但它对我不起作用。
在某些设备(LG Stylus 3 Android 7.0)上,当您按下并将应用程序从桌面移动到垃圾桶时,应用程序不会从设备中删除。您可以稍后通过这种方式恢复被丢弃的应用程序,而无需从Google Play重新安装它。如果是您的情况,您可能会看到此错误:
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
当试图从Android Studio通过ADB重新安装应用程序时。转到设置-
如果您收到此错误,可能是因为您尝试加载的应用程序仍安装在同一设备上的另一个用户帐户中。
换句话说,为当前用户帐户卸载应用程序并不一定为设备上的所有其他用户帐户卸载相同的应用程序。
如果你进入设置=
为所有用户卸载应用程序后,此错误应该会消失,您应该能够加载和运行该应用程序。
我的项目也有同样的问题。我通过导航到文件并单击无效缓存/重新启动来解决它。