Error while executing: am start -n "pagekageName/pagekageName.ac.WelcomeActivity" -a android.inte...

今天真机运行项目发现报了这个错误:

Error while executing: am start -n "pagekageName/pagekageName.ac.WelcomeActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=pagekageName/.ac.WelcomeActivity }

Error type 3

Error: Activity class {pagekageName/pagekageName.ac.WelcomeActivity} does not exist.

Error while Launching activity

出现这种状况的原因如下:

手动卸载了手机上的App,然后点击Android Studio的运行按钮就出现了上面的bug.死活还是运行不起来!


1.win+r输入cmd打开小黑框

输入命令:adb uninstall packageName(packageName:包名)


果然是没有卸载干净的原因,然后运行adb uninstall 卸载成功后,再次点击Android Studio的运行按钮,成功安装运行。

你可能感兴趣的:(Error while executing: am start -n "pagekageName/pagekageName.ac.WelcomeActivity" -a android.inte...)