2

The android manifest xml file does not contain that information. The android.yml file does. After altering it the apk build command doesn't make the apk file. Is there any build.gradle file or tool that can be used to edit version number?

Procedure:

apktool d myapk.apk
open apktool.yml, increment versionCode and save
apktool b

Followed by jarsigner and zip align

Similar: can I change version code from apk?

Community
  • 1
  • 1
Google
  • 21
  • 1
  • 3

1 Answers1

2

There is a way you can fix this problem. I faced it myself and found a solution but it's a crazy one. Here is what I did to change the version code and version name.

  1. I edited the androidmanifest.xml adding the following in <?xml> tag android:compilesdkversion="23" android:compilesdkversioncodename="6.0-2438415". The numbers are what i used and yours should be what is used for platformbuildversioncode and platformbuildversionename.
  2. Compile the app
  3. Use Apk-Editor app on Android platform to decode and build .apk files and fully decode the app.
  4. Try to build it and it will give you an error message found on androidmanifest.xml
  5. View the error message and delete what you wrote in step 1.
  6. Edit the versioncode and versionname there. And then save it.
  7. Build it. It will generate the apk file to you with the updated version.

It's crazy but it works.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Exactly! watch this until the end; it shows how to do so: https://www.youtube.com/watch?v=7UO42j-9EGw – Amt87 Aug 08 '20 at 05:11