“You cannot upload a test-only APK” when building by command line (assemble{Flavor}{Flavor}Release)
“You cannot upload a test-only APK” when building by command line (assemble{Flavor}{Flavor}Release)
I'm aware of this question Google Play error: cannot upload a test-only APK.
But I've built by assemble{Flavor}{Flavor}Release and Developer Console still rejected my build, while assembleRelease worked but took a long time because it has built all of the flavors. Only adding android.injected.testOnly=false to gradle.properties helps. Any ideas what is wrong?
assemble{Flavor}{Flavor}Release
assembleRelease
android.injected.testOnly=false
Release key, debuggable to false, proguarded.
– Michał K
Jul 2 at 17:31
1 Answer
1
Try install command with -t option
adb install -t /path/to/your/apk/app.apk
It's not about installation on the device, but generating the apk and sending it to Google play
– Michał K
Jul 3 at 10:01
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What key do you use for release flavour - debug key or release key?
– Dima Kozhevin
Jul 2 at 17:06