Installation failed with message INSTALL_FAILED_TEST_ONLY. 安卓程序无法安装到手机,提示可能已经安装过
Installation failed with message INSTALL_FAILED_TEST_ONLY. 安卓程序无法安装到手机,提示可能已经安装过错误提示如图
三种解决方法
第一种
1.File(菜单)–Settings(设置)–Build,Execution,Deployment–Instant Run
2.把选中Enable Instant Run to hot swap code/resource changes on deploy(default enabled) 的勾去掉
3.点击Apply–OK,重新运行程序
如图
第二种
1.打开Run–Edit Configurations
2.在Install Flags中写上“-t”
3.点击Apply–OK,重新运行程序
如图
第三种
1.打开Gradle Scripts–gradle.properties
2.添加一句android.injected.testOnly=false
如图