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,重新运行程序

如图
Installation failed with message INSTALL_FAILED_TEST_ONLY. 安卓程序无法安装到手机,提示可能已经安装过

第二种

1.打开Run–Edit Configurations
2.在Install Flags中写上“-t”
3.点击Apply–OK,重新运行程序

如图
Installation failed with message INSTALL_FAILED_TEST_ONLY. 安卓程序无法安装到手机,提示可能已经安装过

第三种

1.打开Gradle Scripts–gradle.properties
2.添加一句android.injected.testOnly=false

如图
Installation failed with message INSTALL_FAILED_TEST_ONLY. 安卓程序无法安装到手机,提示可能已经安装过

这是目前我收集到三种方法,希望有用

。。。。。。。第一次写博客,不是很明白,有错误的地方请大家批评指正

相关文章:

  • 2021-09-09
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
猜你喜欢
  • 2022-01-18
  • 2021-08-31
  • 2022-12-23
  • 2021-08-24
  • 2021-11-23
  • 2022-12-23
  • 2021-08-02
相关资源
相似解决方案