Package upload failed. APK specifies a version code that has already been used.
Android — CI / CD Advanced
Part v — Automatically signing your APK and upload it to Play Store
Please take a await at my previous commodity so you tin can go on from this article seamlessly.
You might run into many problem by configuring this. It's okay, that's the function of learning. If you lot scratching your heads-off, well here we go I nerveless many mistake I've encountered on this journey.
Guide
Link your play store to the firebase
Cull your project
Linked account
Create new s ervice account
Oauth created
Get to Google API console to configure your service business relationship
Click c reate service account
Choose part for your service account
Download private key as a JSON (for ease of use, on Android Studio)
Downloaded automatically
Take note on your service account
Check your play store, it is there
Configure your permission on play store
Check for your permission
That's information technology~
Troubleshooting
Set by adding the correct release signing config
Effort:
Run gradlew tasks to become a list of bachelor tasks. Run with — info or — debug option to go more than log output. * Exception is:
org.gradle.execution.TaskSelectionException: Task 'publishProductionRelease' non found in root project 'your-app'.
Make sure your keystore not tempered and your keystore password is right.
Ready past enabling the Google Play Store API
Execution failed for job ':app:publishApkProductionRelease'.
> com.google.api.customer.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "Admission Not Configured. Google Play Developer API has not been used in project [project-id] earlier or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/androidpublisher.googleapis.com/overview?project=[project-id] then retry. If y'all enabled this API recently, expect a few minutes for the action to propagate to our systems and retry.",
"reason" : "accessNotConfigured",
"extendedHelp" : "https://console.developers.google.com/apis/api/androidpublisher.googleapis.com/overview?projection=[project-id]"
} ],
"message" : "Access Not Configured. Google Play Programmer API has not been used in projection [project-id] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/androidpublisher.googleapis.com/overview?project=[project-id] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
Fix by link the project id to Google Play Developer
Caused past: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.",
"reason" : "projectNotLinked"
} ],
"message" : "The project id used to telephone call the Google Play Developer API has not been linked in the Google Play Developer Console."
}
Download your bodily project id JSON or p12 files. Past clicking the above error url
Set up it by increase your actual versionCode
{
"code" : 403,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "APK specifies a version lawmaking that has already been used.",
"reason" : "apkUpgradeVersionConflict"
} ],
"message" : "APK specifies a version code that has already been used."
} Aye, information technology is self-explanatory just upgrade your actual versionCode + 1 than the play store versoin
Gear up it past using actual signing release
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "APK has not been signed with the upload certificate.",
"reason" : "apkNotSignedWithUploadCertificate"
} ],
"message" : "APK has non been signed with the upload certificate."
} Don't publish the keystore even to your private repos!!! Secure it!
Yous can bank check my article here about purging your remote history
Take a notation here if you specify your custom metada
:app:publishListingRelease FAILED FAILURE: Build failed with an exception. * What went incorrect:
Execution failed for task ':app:publishListingRelease'.
> com.google.api.customer.googleapis.json.GoogleJsonResponseException: 500 Internal Server Error
{
"code" : 500,
"message" : null
}
Change your actual linguistic communication
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"lawmaking" : 403,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "The default linguistic communication for your awarding is not currently supported.",
"reason" : "invalidDefaultLanguage"
}, {
"domain" : "androidpublisher",
"message" : "Invalid contact phone number specified for this app.",
"reason" : "invalidAppContactPhone"
} ],
"message" : "The default language for your application is not currently supported."
} No high resolution icon set for language *
Execution failed for task ':app:publishListingProductionRelease'.
> com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "androidpublisher",
"bulletin" : "This app has no loftier resolution icon prepare for language en_US.",
"reason" : "noHiResIcon"
}, {
"domain" : "androidpublisher",
"bulletin" : "This app has no feature graphic ready for linguistic communication en_US.",
"reason" : "noFeatureGraphic"
}, {
"domain" : "androidpublisher",
"bulletin" : "This app has too few screenshots for language en_US.",
"reason" : "tooFewScreenshots"
} ],
"bulletin" : "This app has no high resolution icon gear up for language en_US."
} Brand certain to check your default language on the play shop console, and if non set your icon first
zipAlignEnabled due to triplet version
Artikel ini di tulis oleh Mochamad Iqbal Dwi Cahyo beliau seorang enthusiast dan photographer. Follow profilnya untuk mendapatkan update-an terbaru artikel-artikel beliau.
Jika anda merasa artikel ini menarik dan bermanfaat, bagikan ke lingkaran pertemanan anda, agar mereka dapat membaca artikel ini.
Atau jika anda tertarik untuk membagikan cerita anda pada publikasi ini, anda boleh mengirimkan cerita anda ataupun mengikuti langkah-langkah yang ada disini .
Source: https://medium.com/easyread/android-ci-cd-advanced-63ac3cde12bd
0 Response to "Package upload failed. APK specifies a version code that has already been used."
Postar um comentário