How to workaround Xamarin Androids VersionCode limitation
Learn why your Xamarin Android build fails with "Error executing task Aapt: VersionCode is outside 0, 65535 interval" and how to workaround that issue.
Learn why your Xamarin Android build fails with "Error executing task Aapt: VersionCode is outside 0, 65535 interval" and how to workaround that issue.
As we first heard about that issue we wondered how this could happen. We took a look at the build process and couldn't find anything that is obvious. It is counting up the build number and set that as the version code.
Yet, there are cases that can lead you into this trouble. One to mention is the case if you are using the entire build date as your version code. We have seen some configurations going that way. That is not a problem in general as the max value of an integer is big enough. Google Play accepts version codes up to 2.100.000.000 according to the documentation.
Searching for a solution I came to this question at the Xamarin forums and bug ticket 51620 - which is not accessesible anymore due to the move from bugzilla to github. Both suggest to disable the "Generate one package (.apk) per selected ABI" option under the Android Build settings.
This suggested solution works. But it can lead in a bloated apk file depending on the selected ABIs configured under the "Advanced"-tab. If you distribute separate ABI-packages to Google Play, you need another way to go.
If you do not want to end like this guy on stackoverflow, follow these steps to update your version code after Xamarin.Android builds your apk.
apktool d $APK_PATH -o $OUTPUT_FOLDER
apktool build $OUTPUT_FOLDER
jarsigner -verbose -keystore $KEYSTORE_PATH -storepass $KEYSTORE_PASSWORD -keypass $KEYSTORE_KEY_PASSWORD $APK_PATH $KEYSTORE_KEY_NAME ~/android-sdk/build-tools/25.0.2/zipalign -v 4 $APK_PATH $APK_OUT_PATH
A quick reminder to take a look at Xamarins documentation on how you should create version codes for abi specific apks, if you go that route.
Voice input makes it possible to intuitively record food eaten and drunk without having to look at a device or tap. Instead of laboriously entering everything by hand, users can simply record their meals and snacks by voice command. This approach can lower the inhibition threshold and encourage users to continuously document their eating habits. This saves time and encourages regular documentation.
Modern applications are becoming more design-centric and therefore end-user-centric. For the user, the technical side of the program is not at all interesting, but rather taken for granted. Attractive design, animation and ease of use, on the contrary, all other things being equal, can make the application more popular among competitors.
Mit dem nahenden Ende des Supports für Xamarin im Mai 2024 sind Entwickler damit beschäftigt, bestehende Xamarin.Forms-Projekte auf .NET MAUI als Nachfolger zu migrieren. Das tun wir natürlich auch. In diesem Artikel zeige ich 7 Schritte, die wir während des Übergangs immer machen mussten, um Ihnen den Umstieg auf .NET MAUI zu erleichtern.