解决 adb 安装 apk 出现 Failure [INSTALL_FAILED_TEST_ONLY] 错误

平台版本是android 7.0,在adb install *.apk 会提示下面的错误:
Failure INSTALL_FAILED_TEST_ONLY

方法1:

修改AndroidManifest.xml 中android:testOnly="true" 改成 android:testOnly="false",或者直接去掉。

方法2:

adb push .apk /tmp
adb shell pm install -t /tmp/
.apk

方法3:

adb install -t *.apk