当前位置: 移动技术网 > 移动技术>移动开发>Android > Android 安装错误 Error while executing: am start -n 安装失败解决

Android 安装错误 Error while executing: am start -n 安装失败解决

2020年09月27日  | 移动技术网移动技术  | 我要评论
之前的手机安装过app,之后卸载后在重装就不行了。报:Error while executing: am start -n "pagekageName/pagekageName.ac.SpActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAU

之前的手机安装过app,之后卸载后在重装就不行了。

报:

Error while executing: am start -n "pagekageName/pagekageName.ac.SpActivity" -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.SpActivity} Error type 3 Error: Activity class {pagekageName/pagekageName.ac.SpActivity} does not exist. Error while Launching activity

出现这种状况的原因如下:
手动卸载了手机上的App,然后点击Android Studio的运行按钮还有打包后的apk安装,死活运行不起来!
自己尝试了如下几种方式:

1、在文件管理器中找到安装目录,删除。
2、clean project
3、Invalidate and Restart
4、Setting->Build,Execution,Deployment->Instant Run 设置checkbox为非选中状态
5、adb kill-server 然后adb start-server
6、重复关闭和打开手机的adb模式或者开发者选项
7、adb install D:\xxx.apk
上面几种方式都不行,就在网上搜索,在Android studio的Terminal中用了adb uninstall packageName命令运行了一下(连接的手机只能有一个(adb),不然会报错)。

运行后提示success,在点击安装就ok了。

如果遇到提示adb不是内部命令的话,需要你去环境变量配置,具体搜索adb配置就有,再此感谢:

https://blog.csdn.net/chunqiuwei/article/details/94738268

https://blog.csdn.net/xunxue1523/article/details/107167685/

本文地址:https://blog.csdn.net/li18518326892/article/details/108822509

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网