错误弹窗如图:

android studio 运行程序提示Application installation failed

Installation failed with message Failed to finalize session: INSTALL_FAILED_TEST_ONLY:installPackageLI.

It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.


WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

1.Clean Project之后再试,如果还不行就在模拟器上面卸载该app。

2解决方法:

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,重新运行程序,大功告成。 

android studio 运行程序提示Application installation failed

我使用第一种方式,完美的解决了我自己的问题。

相关文章:

  • 2022-12-23
  • 2022-01-10
  • 2021-06-08
  • 2021-06-25
  • 2021-04-06
  • 2021-04-08
  • 2021-10-28
  • 2021-12-02
猜你喜欢
  • 2021-10-22
  • 2021-11-17
  • 2021-09-25
  • 2022-12-23
  • 2021-11-25
相关资源
相似解决方案