今天拉下项目来发现安装不了,手机上根本没装过,显示安装失败。。报错:
Installation failed with message 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?
在gradle.properties中添加:
android.injected.testOnly=false
在全局中禁止testOnly。。即可解决这个错误。
亲测有效