错误记录手机中调试程序报错 ( The application could not be installed: INSTALL_FAILED_TEST_ONLY )
Posted 韩曙亮
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误记录手机中调试程序报错 ( The application could not be installed: INSTALL_FAILED_TEST_ONLY )相关的知识,希望对你有一定的参考价值。
文章目录
一、报错信息
17:18 Gradle build finished in 2 s 904 ms
17:18 Failed to commit install session 1905086282 with command cmd package install-commit 1905086282. Error: INSTALL_FAILED_TEST_ONLY
17:18 Error
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_TEST_ONLY
Retry
17:18 Session 'app': Installation did not succeed.
The application could not be installed: INSTALL_FAILED_TEST_ONLY
Retry
二、解决方案
1、问题分析
点击 按钮运行调试程序时 , 会在 清单文件的 application 标签中自动生成
android:testOnly="true"
属性 , 有些手机不支持此类应用安装 ;
2、解决方案一
在 " 菜单栏 / Build " 下 :
- 使用 Build APK(s) 编译的调试版应用可以运行 ;
- 使用 Make Project 编译的调试版应用可以运行 ;
- 使用 Generate Signed APK 签名打包的发布版本应用也可以运行 ;
3、解决方案二
在 gradle.properties 中配置
android.injected.testOnly=false
内容 ;
以上是关于错误记录手机中调试程序报错 ( The application could not be installed: INSTALL_FAILED_TEST_ONLY )的主要内容,如果未能解决你的问题,请参考以下文章
Xcode真机调试报错:The application could not be verified.
angularJS报错$apply already in progress的原因和解决方法
MTK手机刷机遇到"PMT changed for the ROM"报错怎么办
错误记录Android Studio 打包 apk 文件报错 ( The destination folder does not exist or is not writeable )
错误记录Android Studio 创建报错 ( The length of the module location exceeds the limit of 100 characters. )(代
错误记录Android Studio 创建报错 ( The length of the module location exceeds the limit of 100 characters. )(代