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
- Install with adb install -t (testing only)
- Build a shareable APK with ./gradlew assembleDebug or assembleRelease
Detailed fix by platform
ADB
- kotlin
adb install -t app-debug.apk ./gradlew assembleDebug # produces a normal debug APK
How to diagnose
- Source — How was the APK built?
- 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:
Similar errors
- adb server version doesn't match adb server version (41) doesn't match this client (39); killing...
- adb unauthorized adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set
- INSTALL_FAILED_INSUFFICIENT_STORAGE INSTALL_FAILED_INSUFFICIENT_STORAGE: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
Most viewed in Android
Other ways to find it
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026