2020-03-17 下载的最新android studio 3.6.1 提示The application could not be installed: INSTALL_FAILED_TES...

打印:

03/17 14:22:21: Launching 'app' on vivo vivo Z3x.

Installation did not succeed.

The application could not be installed: INSTALL_FAILED_TEST_ONLY

Installation failed due to: 'null'

Retry



1、问题

笔记本新安装的Android studio(版本3.6.1)运行最简单的程序,错误提示如下

The application could not be installed: INSTALL_FAILED_TEST_ONLY


2、分析

高版本的Android studio里面AndroidManifest.xml文件默认如下

android:testOnly="true"


3、解决办法

我尝试了用如下命令安装失败了

adb install -t app-debug.apk

然后我尝试在AndroidManifest.xml里面添加了如下也失败了

android:testOnly="false"

最后我在项目中的gradle.properties全局配置中设置如下,后面就运行成功了。

android.injected.testOnly=false

还有一个办法,在AS里面直接Build Apk(s)

Build->Build Bundle(s)/Apk(s)-> Build Apk(s)

你可能感兴趣的:(2020-03-17 下载的最新android studio 3.6.1 提示The application could not be installed: INSTALL_FAILED_TES...)