Table of contents

Android Studio ADB install apk INSTALL_FAILED_TEST_ONLY

Android Feb 19, 2020 Viewed 2.1K Comments 0

Problem

In the past, I used Android Studio to run and debug Android projects on oppo phones. It was normal. However, after updating the mobile phone system (upgrading to Android 9), an exception occurred. Finally, when entering the apk installation page of the mobile phone, it prompts INSTALL_FAILED_TEST_ONLY. The console outputs the following information:

01/18 16:30:49: Launching 'app' on OPPO PAAT00.
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_TEST_ONLY
Installation failed due to: 'null'
Retry

Here are the test results for other phones:

Android Studio: 3.5.1

oppo PAAT00: Android 9 fail

MI 5s Plus: Android 7 sucessful

HONOR_KNT-AL10: Android 8 sucessful

vivo V1911A: Android 9 sucessful

Solution

Add a line to the project's gradle.properties file.

android.injected.testOnly=false

Click Sync Now, and re-install.

Updated Feb 19, 2020