tags | ||
---|---|---|
|
Android Studio 3.0 sets android:testOnly="true"
automatically on APKs that are ran from the IDE.
However, for some devices (such as OPPO R11), the test-only APKs can never be installed ...
If you face the same problem, try add this line to your '/gradle.properties':
# gradle.properties
android.injected.testOnly=false
Then the boring android:testOnly
attribute disappears. ( ͡° ͜ʖ ͡°)✧
BTW, if you do not have an 'OPPO R11' (congratulations), and just want to install such a test-only app with adb
, try:
adb install -t <test_only_apk_filename>.apk
Otherwise, you will get a failure message:
Failed to install app-debug.apk: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
Hi, I'm having this problem and I don't don't understand, what do you mean by:
"add this line to your '/gradle.properties' "
Where is it? I don't see any file by that name, I have 2:
"build.gradle" files,
and "settings.gradle", and "gradle-wrapper.properties".
But no file with the name that you wrote.
Where is it?