OPPO手机 连接Android Studio 进行调试时发现无法安装,报出如下错误
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_TEST_ONLY
只需手动 Build apk
然后用adb 安装即可
adb install -t debug.apk
部分其他手机出现这种情况
gradle.properties文件添加
android.injected.testOnly=false
或者把 AndroidManifest.xml
android:testOnly="true"
改成
android:testOnly="false"