1.helloworld下载到手机后手动删除,在android stdio中就无法再运行了,提示 Error while Launching activity
解决:在android stdio的Terminal中输入 adb uninstall com.example.administrator.helloworld就可以了。
如下图
另外手机连接时要选择开发者模式,点USB调试。
另外连上数据线时有时选择仅充电,会让android stdio无法检测到手机,最好选文件传输。
若只选充电,在开发者选项中要点“仅充电”模式下高充许ADB调试。
如果换了计算机再重新运行代码的话,要clean project ,再rebuild