INSTALL_FAILED_TEST_ONLY Android Origin: On your device Last updated 13 Oct 2026

INSTALL_FAILED_TEST_ONLY: installPackageLI

The APK is marked testOnly (built by Android Studio’s Run button), so normal installs refuse it.

Exact message you may see installPackageLI testOnly
Seen on: Android

Meaning

APKs from Run → app include android:testOnly="true" and can only be installed with adb install -t. Share builds made with Build → Build APK(s) or assembleDebug instead.

Common causes

  • Sharing an APK built via the Run button
  • Build config adding testOnly

⚡ Quick fix

  1. Install with adb install -t (testing only)
  2. Build a shareable APK with ./gradlew assembleDebug or assembleRelease

Detailed fix by platform

ADB

  1. kotlin
    adb install -t app-debug.apk
    ./gradlew assembleDebug   # produces a normal debug APK

How to diagnose

  1. Source — How was the APK built?
  2. Manifest — android:testOnly present?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

adb server version doesn't match — adb server version (41) doesn't match this client (39); killing... (Android)adb server version do…adb unauthorized — adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set (Android)adb unauthorizedINSTALL_FAILED_INSUFFICIENT_STORAGE — INSTALL_FAILED_INSUFFICIENT_STORAGE: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE] (Android)INSTALL_FAILED_INSUFF…INSTALL_FAILED_NO_MATCHING_ABIS — INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries (Android)INSTALL_FAILED_NO_MAT…INSTALL_FAILED_OLDER_SDK — INSTALL_FAILED_OLDER_SDK / INSTALL_FAILED_DEPRECATED_SDK_VERSION (Android)INSTALL_FAILED_OLDER_…INSTALL_FAILED_UPDATE_INCOMPATIBLE — Android: INSTALL_FAILED_UPDATE_INCOMPATIBLE (Android)INSTALL_FAILED_UPDATE…INSTALL_FAILED_USER_RESTRICTED — INSTALL_FAILED_USER_RESTRICTED: Install canceled by user (Xiaomi/MIUI, Oppo, Vivo) (Android)INSTALL_FAILED_USER_R…INSTALL_PARSE_FAILED_NO_CERTIFICATES — INSTALL_PARSE_FAILED_NO_CERTIFICATES / App not installed as package appears to be invalid (Android)INSTALL_PARSE_FAILED_…INSTALL_F…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.