I'm using the Jenkins AndroidAPKUpload plugin.
I have a draft version of an app in the Play store. The app is intended only for internal testing and it will never be released to the public. I assume that means it will be a draft forever.
When I try to upload the APK via the plugin I receive the error "Only releases with status draft may be created on draft app"
Is there a way I can mark my app as draft? A setting in the build.gradle file perhaps?
if you switch to fastlane, then you can:
draft
release, andinternal
https://docs.fastlane.tools/actions/upload_to_play_store/
lane: deploy
upload_to_play_store(
track: 'internal',
release_status: 'draft',
apk: path_to_your_apk
)
end
I've had the same issue while using Bitrise's Google Play Deploy step, and the reason for this is that if your app on Google console is not set up (privacy policy, app access, content rating etc.), then you cannot create alpha track, only internal track.
So once you first manually put the first app version in internal track, the mentioned Google Play Deploy step will work fine, you just have to set it's status
property to draft
.
I did solve the problem, although to be honest, I don't remember exactly what I did. I believe I manually uploaded the first APK to the Alpha channel in the Play console. Then I released that version internally. After that I was able to upload automatically from Jenkins.
If your app is in "draft" state, the Play Console API refuses releases that are not in the "draft" state. It's unclear whether the API supports releasing without submitting the app setup forms (I filed feedback). You can then release on the web page once the draft release is created, but it's a manual step.
See this issue for a similar tool: https://github.com/eventOneHQ/apkup/issues/49
The problem probably resolved itself for you because by creating an Alpha channel release also completed the app setup, moving the app away from the draft state (it should say "Closed testing" in the app selector).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With