question

jaimel avatar image
jaimel asked tomdanny commented

APK's versionCode error

I have updated the versionCode on both locations of the APK, the grade file and the manifest with the same value, when I try to upload a new APK into the production portal I keep getting the same error, can somebody assist?

Clover Android SDK
5 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jaimel avatar image jaimel commented ·

The error is

Oops! Invalid File!

You must increment your APK's versionCode every time you upload. If you are testing and want to get around this, please side-load your app.

0 Likes 0 ·
ezra avatar image ezra commented ·

Make sure that the versionCode in the gradle file and the manifest file are both the same and that they match the versionCode of the previously uploaded APK. If they don't match, this could cause the error.

Check to see if there are any other errors or warnings in your gradle build output. Sometimes, there may be other issues in your build that are causing the error.

If you're using Google Play Console to upload your APK, make sure that you're uploading the correct APK file. Sometimes, developers accidentally upload the wrong APK file, which can cause issues.

Try cleaning and rebuilding your project. Sometimes, this can help to resolve build-related issues.

0 Likes 0 ·
dustindepp avatar image dustindepp commented ·

The most common reason for getting an error when uploading a new APK to the production portal is that the versionCode has not been updated. The versionCode is a unique identifier for your app, and it must be incremented each time you release a new version of your app.

0 Likes 0 ·
tomdanny avatar image tomdanny commented ·

Resolve versionCode errors in APKs with expert assistance from Jumbo Electronics UAE. Our specialized team offers support to diagnose and troubleshoot issues related to versioning in Android applications, ensuring seamless deployment and compatibility across devices. Whether it's debugging code, updating dependencies, or implementing version control strategies, we provide solutions to address the root cause of the problem and ensure smooth operation of your APKs. Trust Jumbo Electronics UAE to assist you in resolving versionCode errors efficiently.

0 Likes 0 ·
tomdanny avatar image tomdanny commented ·

Encountering an error with APK versionCode can be frustrating but manageable. Ensure versionCode follows numerical order water bottles, incrementing with each update. Verify the code matches manifest file entries precisely. Double-check build configurations and dependencies for discrepancies. Utilize debugging tools to identify potential issues during the build process. By meticulously reviewing and troubleshooting, you can resolve versionCode errors and ensure smooth deployment of your Android application.

0 Likes 0 ·
jaimel avatar image
jaimel answered
David, that worked, so I was changing the wrong gradel file, how can I get the new APK approved and download to the terminal that we have on our office?
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

Can you provide us with your App id in a moderator's only post?

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jaimel avatar image jaimel commented ·

ER.......P6

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ jaimel commented ·

What is the versionCode in the manifest of the file you are trying to upload?

0 Likes 0 ·
jaimel avatar image
jaimel answered David Marginian Deactivated converted comment to answer

grade:

defaultConfig {
    versionCode 5
    versionName "5.0"
  minSdkVersion MIN_SDK_VERSION
  targetSdkVersion TARGET_SDK_VERSION
}
manifest:
android:versionCode="5"
android:versionName="5.0"
15 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

The versionCode in our database is 32,000.

0 Likes 0 ·
jaimel avatar image jaimel David Marginian ♦♦ commented ·
David, where is that value in the project?, I have not been able to locate that value.
0 Likes 0 ·
jaimel avatar image jaimel jaimel commented ·
I took the SDK example project as a template to create our own, so that value was there by default, but normally in other apps that I created the versionCode is always in the manifest and now in the gradel file. But I can not find that value of 32.000 anywhere.
0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community