Xamarin.Android 10.0.0.4
Pre-releaseXamarin.Android 10.0.0.4 was released as part of Visual Studio 2019 version 16.3 Preview 2 and to the Preview updater channel of Visual Studio 2019 for Mac.
Corresponding Visual Studio 2019 Preview release notes
What's new
- Bindings for Android Q Beta 4 with final APIs
- Improved support for Android App Bundle publishing format
- Mono Framework version update to 6.4
- Issues fixed
- Known issues
Bindings for Android Q Beta 4 with final APIs
Xamarin.Android 10.0 updates the bindings for Android Q to match the Android Q Beta 4 release from Google, which includes the final APIs for Android Q. See the Android Q Beta documentation for additional information about the behavior and API changes in this new Android version. To use the bindings for the new APIs in a Xamarin.Android project, set Compile using Android version: (Target Framework) to Android 10.0 (Q) under the Application tab of the Visual Studio project property pages.
Improved support for Android App Bundle publishing format
The previous limitation with the Install location when using the Android App Bundle Bundle publishing format is now resolved. Projects that have the $(AndroidPackageFormat)
MSBuild property to aab
that are built on the command line using the SignAndroidPackage
MSBuild target now produce .aab packages compatible with any Install location. This resolves the following issue:
- GitHub 3298: "JNI DETECTED ERROR IN APPLICATION: mid == null" or "CallStaticIntMethodV received NULL jclass" "... in call to CallStaticIntMethodV ... from void mono.android.Runtime.init" prevented apps packaged using the Android App Bundle publishing format and an Install location other than Internal Only from running successfully when installed via Google Play on devices running Android versions between 6.0 Marshmallow (API level 23) and 8.1 Oreo (API level 27).
The version of the bundletool
executable included in Xamarin.Android has also been updated from 0.8.0 to 0.10.0, bringing in several improvements and bug fixes.
Mono Framework version update to 6.4
This version of Xamarin.Android updates the Mono runtime and class libraries from Mono 6.0 to Mono 6.4 Commit 17ac7dcf, adding about 1,500 new commits.
Issues fixed in Xamarin.Android 10.0.0.4
Application behavior on device and emulator
- GitHub 3263: Errors similar to "System.TypeLoadException: Could not load type 'Android.Text.ITextWatcherInvoker' from assembly 'Mono.Android" would cause app execution to abort during calls to certain C# bindings for Android methods in apps built with the manager linker enabled.
- GitHub 3314: "Java.Lang.Exception: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f080058" error would abort app execution on Android 4.4 KitKat (API level 19) or lower for apps built with AAPT2 that uses Android Support Libraries.
Application and library build process
- GitHub 3237: In projects configured to use AAPT2, errors similar to "error CS0117: 'Resource' does not contain a definition for 'Layout'" could sometimes abort the build when attempting to build solutions with parallel builds enabled.
- GitHub PR 3243: Warnings similar to "warning XA0106: Skipping AndroidApp.Resource.Drawable.avd_hide_password_1. Please check that your Nuget Package versions are compatible." appeared during builds when libraries referenced Android resources in certain ways. These items are now logged as informational messages instead of warnings.
- GitHub 3336: In projects configured to use AAPT2, invalid Android resource elements added after an initial successful design-time build did not produce errors during subsequent incremental builds.
- GitHub 3343: Errors similar to "error: cannot access ListenableFuture ... class file for com.google.common.util.concurrent.ListenableFuture not found" could cause the build to fail during the
_CompileJava
target when using certain libraries like Xamarin.Google.Guava.ListenableFuture that included an embedded .jar file and no public managed types. - GitHub PR 3379: Starting in Xamarin.Android 9.4.0.52, "The "FilterAssemblies" task was not given a value for the required parameter "DesignTimeBuild"." error prevented projects from building successfully when they uses certain additional MSBuild targets, such as the targets from the NuGet.Build.Packaging NuGet package.
Xamarin.Android SDK installation
- GitHub PR 3350: "Package contains system volume install location content" error would prevent successful installation of the Xamarin.Android SDK on the macOS Catalina preview.
Known issues in Xamarin.Android 10.0.0.4
- GitHub 3454: The fix for GitHub 3263 unintentionally preserves additional types during managed linking, resulting in APK files that are about 7 megabytes larger than expected, depending on which libraries the app uses.
OSS core
The corresponding open-source build without commercial features is xamarin-android-d16-3 build #27.
Both the commercial build and the open-source build use the Mono and libzip artifacts from the bundle*.7z archive generated by the previous open-source build: xamarin-android-d16-3 build #26.