Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSTALL_FAILED_TEST_ONLY: installPackageLI #493

Open
sarmadali20 opened this issue Oct 31, 2017 · 5 comments
Open

INSTALL_FAILED_TEST_ONLY: installPackageLI #493

sarmadali20 opened this issue Oct 31, 2017 · 5 comments

Comments

@sarmadali20
Copy link

keep getting below exception
com.android.ddmlib.InstallException: INSTALL_FAILED_TEST_ONLY: installPackageLI

using spoon-runner-2.0.0-20171020.002642-36

command used:
java -jar spoon-runner.jar $TEST_APK $OTHER_APK

@bholota
Copy link
Contributor

bholota commented Nov 1, 2017

Prolly it's related to Android Studio 3.0 - it sets android:testOnly="true" by default. Could you validate that?

@sarmadali20
Copy link
Author

yes setting android:testOnly="false" for debug manifest works

@spartanglady
Copy link

I'm Facing the same issue. I'm using spoon runner 1.7.1 jar file. It was working fine for me and it stopped working all of a sudden. I have not made any upgrades to the sdk or to the environment. Is there any other way to debug whats going ?

@josefadamcik
Copy link

For all having this issue: it's possible you are trying to use APKs built by Android Studio when using the "run as" feature (running tests or app from Android studio). Such APKs are buit with the "testOnly" flag.

Try to rebuild your apks with gradle ./gradlew assembleDebug assembleAndroidTest (or similar)

@paolomoschini
Copy link

From https://developer.android.com/studio/run/index.html

Note: The Run button builds an APK with testOnly="true", which means the APK can only be installed via adb (which Android Studio uses). If you want a debuggable APK that people can install without adb, select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).

Just go to Build > Build APK(s) to have a non testable release apk that you can submit :)

Tested on Android Studio 3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants