android studio运行项目安装到手机上失败,提示The application could not be installed: INSTALL_FAILED_TEST_ONLY

最近新建的项目老是安装不了,提示:The application could not be installed: INSTALL_FAILED_TEST_ONLY

如下图所示:

android studio运行项目安装到手机上失败,提示The application could not be installed: INSTALL_FAILED_TEST_ONLY_第1张图片

解决办法
在gradle.properties(项目根目录或者gradle全局配置目录 ~/.gradle/)文件中添加android.injected.testOnly=false

android studio运行项目安装到手机上失败,提示The application could not be installed: INSTALL_FAILED_TEST_ONLY_第2张图片

你可能感兴趣的:(app安装失败,android,studio)