adb install 報錯:INSTALL_FAILED_TEST_ONLY
阿新 • • 發佈:2021-02-10
問題描述
- adb install 安裝apk時,報如下錯誤:Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
解決方法
方法一: 加引數 -t
adb install -t test.apk
方法二:在Android Studio專案中的gradle.properties
全域性配置中設定如下,可取消自動在apk新增 android:testOnly="true" 屬性。
android.injected.testOnly=false
詳細分析
- Android Studio 3.0後預設在debug apk中的manifest中新增 android:testOnly="true"
- 官網關於adb install -t 說明如下: