locked
aapt.exe - VersionCode too high? RRS feed

  • Question

  • User16021 posted

    Hello,

    I've just updated Xamarin for Visual Studio (Xamarin 4.2.0.680 and Xamarin.Android 7.0.0.18 according to About dialog), and my project no longer builds.

    I get the message: Invalid command line switch for "aapt.exe". VersionCode is outside 0, 65535 interval

    Indeed, my version code is 220622, but that was always okay and all the documentation I can find online say that version code is a 32-bit integer and has a maximum of something like 2000000. There should be no problem with this value, but suddenly it's not okay any more. Obviously decreasing the value isn't an option, because then Android will refuse to see newer releases an an upgrade over existing installed versions.

    "aapt.exe" in this case is "SDK\build-tools\23.0.0\aapt.exe" if that helps at all.

    Can anybody explain what's happening here, and help me resolve it? I'll just set the version to 1 for now so I can debug, but I need to resolve this before I can publish a new release...

    Thanks

    Tuesday, September 13, 2016 10:44 PM

All replies

  • User16021 posted

    I've managed to stop this happening by unchecking 'Generate one package (.apk) per selected ABI'. I tried various combinations of options and target SDK versions, but this option is the only thing that seems to make a difference. When unchecked, I don't get the error.

    I assume this is a bug in the build process? Is there somewhere I should report this?

    Wednesday, September 14, 2016 9:44 PM
  • User241403 posted

    I´m also, experiencing this problem! And I need to mark Generate One Package (.apk) per Selected ABI!

    He generates apk with random Version Codes

    Wednesday, October 26, 2016 5:39 PM