INSTALL_FAILED_TEST_ONLY 🤖 Android

INSTALL_FAILED_TEST_ONLY: installPackageLI

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

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:

🧠 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.