Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#

Overview

Xamarin.Android banner

Xamarin.Android

Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#.

Build Status

Platform Status
OSS macOS OSS macOS x86_64
OSS Ubuntu OSS Linux/Ubuntu x86_64

Downloads

Current

Platform Link
Commercial Xamarin.Android 12.1 (d17-0) for Windows+Visual Studio 2022 Download
Commercial Xamarin.Android 12.1 (d17-0) for macOS Download
OSS Xamarin.Android 12.1.99 (main) for Ubuntu* OSS Linux/Ubuntu x86_64

* Please note that the OSS installer packages are not digitally signed.

Previous

Platform Link
Commercial Xamarin.Android 12.0 (d16-11) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 12.0 (d16-11) for macOS Download
Commercial Xamarin.Android 11.3 (d16-10) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 11.3 (d16-10) for macOS Download
Commercial Xamarin.Android 11.2 (d16-9) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 11.2 (d16-9) for macOS Download
Commercial Xamarin.Android 11.1 (d16-8) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 11.1 (d16-8) for macOS Download
Commercial Xamarin.Android 11.0 (d16-7) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 11.0 (d16-7) for macOS Download
Commercial Xamarin.Android 10.3 (d16-6) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 10.3 (d16-6) for macOS Download
Commercial Xamarin.Android 10.2 (d16-5) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 10.2 (d16-5) for macOS Download
Commercial Xamarin.Android 10.1 (d16-4) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 10.1 (d16-4) for macOS Download
Commercial Xamarin.Android 10.0 (d16-3) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 10.0 (d16-3) for macOS Download
Commercial Xamarin.Android 9.4 (d16-2) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 9.4 (d16-2) for macOS Download
Commercial Xamarin.Android 9.3 (d16-1) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 9.3 (d16-1) for macOS Download
Commercial Xamarin.Android 9.2 (d16-0) for Windows+Visual Studio 2019 Download
Commercial Xamarin.Android 9.2 (d16-0) for macOS Download

Contributing

If you are interested in fixing issues and contributing directly to the code base, please see the following:

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

Feedback

Discord

License

Copyright (c) .NET Foundation Contributors. All rights reserved. Licensed under the MIT License.

Comments
  • failure to deploy to physical device

    failure to deploy to physical device

    After i installed xf 5.0.i can no longer deploy to physical device ( Note 9 Api 29 ) rolled back to 4.8 problem still persists. Only for physical devices, emulator deploys ok. Doesn't mater what project i open the result is the same. It hangs here "Detecting installed packages...". Repaired VS ( Community 2019, Version 16.8.4 ) but still no change.

    need-info Area: App+Library Build 
    opened by fbd-ss 138
  • Xamarin.Android task cannot find NDK with latest Azure image(s)

    Xamarin.Android task cannot find NDK with latest Azure image(s)

    Android application type

    Classic Xamarin.Android (MonoAndroid12.0, etc.)

    Affected platform version

    Azure pipeline

    Description

    Making use of the Xamarin.Android task we have been able to build and deploy Xamarin.Android applications. New images were released which seems to have affected this task; the NDK path is no longer found when executing the "_ResolveMonoAndroidSdks" step resulting in a build failure.

    Reviewing the latest releases for these images, I see there was work around NDK paths, symlinks, and environment variable changes. https://github.com/actions/virtual-environments/issues/5879 https://github.com/actions/virtual-environments/issues/5930

    The image we're using is macOS-latest, here are the old and new logs showing the "_ResolveMonoAndroidSdks" step resolving the NDK path: Old working image (20220724.1) Screenshot 2022-08-04 at 12 37 45

    New broken image (20220801.1) Screenshot 2022-08-04 at 12 38 40

    Do we know if the Xamarin.Android task needs to be updated to reflect this?

    Steps to Reproduce

    1. Make use of the Azure Pipeline Xamarin.Android task for a Xamarin.Android application using the macOS-latest image.
    2. See the task eventually fails with error XA5104: Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNdkDirectory) MSBuild property is set to the custom path.

    Did you find any workaround?

    No response

    Relevant log output

    No response

    Area: App+Library Build 
    opened by Maxgamerboy1 85
  • Android 12: splash screen is no longer displayed while the app loads

    Android 12: splash screen is no longer displayed while the app loads

    Steps to Reproduce

    1. Run the official SplashScreen sample
    2. Remove the artificial delay added by the sample before running the main activity
    3. Observe that on Android 11 the splash screen is display from the moment the app runs, whereas on Android 12 it is only displayed for a split second just before the main page is rendered.

    This may be an OS change and not a Xamarin problem, but it still struck me as a rather odd user experience and I wanted to make sure it wasn't something in Xamarin itself (e.g. maybe Xamarin needs to change to use the new SplashScreen APIs?)

    SplashScreen.zip

    Expected Behavior

    Splash screen displayed during app boot-up, as on Android 11 and lower.

    Actual Behavior

    On Android 12 the splash screen is only displayed for a brief time, if at all.

    Version Information

    VS 2022

    Area: Mono.Android 
    opened by mfeingol 66
  • Fast deployment not working / very slow

    Fast deployment not working / very slow

    Happens since VS 16.9 and the changes to the Fast deployment

    Steps to Reproduce

    1. Create standard Android app in VS
    2. Build & deploy
    3. Make C# code change
    4. Redeploy

    App1.zip

    Expected Behavior

    Fast build & deploy

    Actual Behavior

    Slow deploy. The attached demo app takes a whopping 40 secs to recompile, apply the change and launch this barebone app in the simulator

    Version Information

    VS 16.9.0 Xamarin.Android 11.2.0.21

    Log File

    Build started...
    1>------ Build started: Project: App1, Configuration: Debug Any CPU ------
    1>  App1 -> C:\Users\***\Desktop\App1\bin\Debug\App1.dll
    2>Starting deployment to Pixel_4_API_29 ...
    2>Deploying to Pixel_4_API_29 ...
    Build started.
    Project "App1.csproj" (Install target(s)):
    Found Java SDK version 1.8.0.
    Found Java SDK version 1.8.0.
      PackageName: com.companyname.app1
    Dex Fast Deployment Enabled: False
    MonoAndroid Tools: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\
    Android Platform API level: 30
    TargetFrameworkVersion: v11.0
    Android NDK: E:\android-sdk
    dk-bundle\
    Android SDK: E:\android-sdk\
    Android SDK Build Tools: E:\android-sdk\build-tools\30.0.2\
    Java SDK: C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.25\
    Application Java class: android.app.Application
    Touching "obj\Debug\110\stamp\_ResolveLibraryProjectImports.stamp".
    Skipping target "_BuildLibraryImportsCache" because all output files are up-to-date with respect to the input files.
    Skipping target "_GenerateLayoutBindings" because it has no outputs.
    Touching "obj\Debug\110\stamp\_ConvertResourcesCases.stamp".
    Touching "obj\Debug\110\R.cs.flag".
      Adding assembly reference for App1, recursively...
      Adding assembly reference for Java.Interop, recursively...
      Adding assembly reference for Mono.Android, recursively...
        Adding assembly reference for System.Net.Http, recursively...
        Adding assembly reference for System.Drawing.Common, recursively...
        Adding assembly reference for System.Runtime.Serialization, recursively...
          Adding assembly reference for System.ServiceModel.Internals, recursively...
      Adding assembly reference for mscorlib, recursively...
      Adding assembly reference for System.Core, recursively...
      Adding assembly reference for System, recursively...
        Adding assembly reference for Mono.Security, recursively...
      Adding assembly reference for System.Numerics, recursively...
      Adding assembly reference for System.Numerics.Vectors, recursively...
      Adding assembly reference for System.Runtime, recursively...
        Adding assembly reference for System.ComponentModel.Composition, recursively...
      Adding assembly reference for System.Xml, recursively...
      Adding assembly reference for Xamarin.AndroidX.Activity, recursively...
      Adding assembly reference for Xamarin.AndroidX.Annotation, recursively...
      Adding assembly reference for Xamarin.AndroidX.AppCompat.AppCompatResources, recursively...
      Adding assembly reference for Xamarin.AndroidX.AppCompat, recursively...
      Adding assembly reference for Xamarin.AndroidX.Arch.Core.Common, recursively...
      Adding assembly reference for Xamarin.AndroidX.Arch.Core.Runtime, recursively...
      Adding assembly reference for Xamarin.AndroidX.AsyncLayoutInflater, recursively...
      Adding assembly reference for Xamarin.AndroidX.Browser, recursively...
      Adding assembly reference for Xamarin.AndroidX.CardView, recursively...
      Adding assembly reference for Xamarin.AndroidX.Collection, recursively...
      Adding assembly reference for Xamarin.AndroidX.CoordinatorLayout, recursively...
      Adding assembly reference for Xamarin.AndroidX.Core, recursively...
      Adding assembly reference for Xamarin.AndroidX.CursorAdapter, recursively...
      Adding assembly reference for Xamarin.AndroidX.CustomView, recursively...
      Adding assembly reference for Xamarin.AndroidX.DocumentFile, recursively...
      Adding assembly reference for Xamarin.AndroidX.DrawerLayout, recursively...
      Adding assembly reference for Xamarin.AndroidX.Fragment, recursively...
      Adding assembly reference for Xamarin.AndroidX.Interpolator, recursively...
      Adding assembly reference for Xamarin.AndroidX.Legacy.Support.Core.UI, recursively...
      Adding assembly reference for Xamarin.AndroidX.Legacy.Support.Core.Utils, recursively...
      Adding assembly reference for Xamarin.AndroidX.Lifecycle.Common, recursively...
      Adding assembly reference for Xamarin.AndroidX.Lifecycle.LiveData.Core, recursively...
      Adding assembly reference for Xamarin.AndroidX.Lifecycle.Runtime, recursively...
      Adding assembly reference for Xamarin.AndroidX.Lifecycle.ViewModel, recursively...
      Adding assembly reference for Xamarin.AndroidX.Lifecycle.ViewModelSavedState, recursively...
      Adding assembly reference for Xamarin.AndroidX.Loader, recursively...
      Adding assembly reference for Xamarin.AndroidX.LocalBroadcastManager, recursively...
      Adding assembly reference for Xamarin.AndroidX.MultiDex, recursively...
      Adding assembly reference for Xamarin.AndroidX.Print, recursively...
      Adding assembly reference for Xamarin.AndroidX.RecyclerView, recursively...
      Adding assembly reference for Xamarin.AndroidX.SavedState, recursively...
      Adding assembly reference for Xamarin.AndroidX.SlidingPaneLayout, recursively...
      Adding assembly reference for Xamarin.AndroidX.SwipeRefreshLayout, recursively...
      Adding assembly reference for Xamarin.AndroidX.Transition, recursively...
      Adding assembly reference for Xamarin.AndroidX.VectorDrawable.Animated, recursively...
      Adding assembly reference for Xamarin.AndroidX.VectorDrawable, recursively...
      Adding assembly reference for Xamarin.AndroidX.VersionedParcelable, recursively...
      Adding assembly reference for Xamarin.AndroidX.ViewPager, recursively...
      Adding assembly reference for Xamarin.Essentials, recursively...
      Adding assembly reference for Xamarin.Google.Android.Material, recursively...
      Adding assembly reference for Xamarin.Google.Guava.ListenableFuture, recursively...
    Skipping target "_CopyConfigFiles" because it has no inputs.
    Skipping target "_ConvertPdbFiles" because it has no outputs.
    Skipping target "_CopyConfigFiles" because it has no inputs.
    Skipping target "_ConvertPdbFiles" because it has no outputs.
    Touching "obj\Debug\110\stamp\_GenerateJavaStubs.stamp".
    C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.25\bin\java.exe -cp "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\manifestmerger.jar" com.xamarin.manifestmerger.Main obj\Debug\110\android\manifestmerger.rsp 
    Skipping target "_ConvertCustomView" because all output files are up-to-date with respect to the input files.
    Copying file from "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v11.0\mono.android.jar" to "C:\Users\***\Desktop\App1\obj\Debug\110\android\bin\mono.android.jar".
    Touching "obj\Debug\110\android\bin\mono.android.jar".
    Touching "obj\Debug\110\static.flag".
    Touching "obj\Debug\110\stamp\_GeneratePackageManagerJava.stamp".
    Skipping target "_GenerateAndroidAssetsDir" because it has no outputs.
    Touching "obj\Debug\110\android\bin\packaged_resources".
    Skipping target "_CompileJava" because all output files are up-to-date with respect to the input files.
    Deleting file "obj\Debug\110\android\bin\classes.dex".
    C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.25\bin\java.exe -Xmx1G -classpath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\r8.jar" com.android.tools.r8.D8 --debug --min-api 23 --output obj\Debug\110\android\bin\ --lib E:\android-sdk\platforms\android-30\android.jar obj\Debug\110\android\bin\classes.zip "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v11.0\mono.android.jar" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\\java_runtime.jar" C:\Users\***\.nuget\packages\xamarin.google.guava.listenablefuture\1.0.0.2\buildTransitive\monoandroid50\guava-listenablefuture.jar C:\Users\***\.nuget\packages\xamarin.androidx.annotation\1.1.0.7\buildTransitive\monoandroid90\..\..\jar\androidx.annotation.annotation.jar C:\Users\***\.nuget\packages\xamarin.androidx.collection\1.1.0.5\buildTransitive\monoandroid90\..\..\jar\androidx.collection.collection.jar C:\Users\***\.nuget\packages\xamarin.androidx.lifecycle.common\2.2.0.3\buildTransitive\monoandroid90\..\..\jar\androidx.lifecycle.lifecycle-common.jar C:\Users\***\.nuget\packages\xamarin.androidx.arch.core.common\2.1.0.6\buildTransitive\monoandroid90\..\..\jar\androidx.arch.core.core-common.jar obj\Debug\110\lp\41\jl\classes.jar obj\Debug\110\lp\42\jl\classes.jar obj\Debug\110\lp\43\jl\classes.jar obj\Debug\110\lp\44\jl\classes.jar obj\Debug\110\lp\45\jl\classes.jar obj\Debug\110\lp\46\jl\classes.jar obj\Debug\110\lp\47\jl\classes.jar obj\Debug\110\lp\48\jl\classes.jar obj\Debug\110\lp\49\jl\classes.jar obj\Debug\110\lp\50\jl\classes.jar obj\Debug\110\lp\51\jl\classes.jar obj\Debug\110\lp\52\jl\classes.jar obj\Debug\110\lp\53\jl\classes.jar obj\Debug\110\lp\54\jl\classes.jar obj\Debug\110\lp\55\jl\classes.jar obj\Debug\110\lp\56\jl\classes.jar obj\Debug\110\lp\57\jl\classes.jar obj\Debug\110\lp\58\jl\classes.jar obj\Debug\110\lp\59\jl\classes.jar obj\Debug\110\lp\60\jl\classes.jar obj\Debug\110\lp\61\jl\classes.jar obj\Debug\110\lp\62\jl\classes.jar obj\Debug\110\lp\63\jl\classes.jar obj\Debug\110\lp\64\jl\classes.jar obj\Debug\110\lp\65\jl\classes.jar obj\Debug\110\lp\66\jl\classes.jar obj\Debug\110\lp\67\jl\classes.jar obj\Debug\110\lp\68\jl\classes.jar obj\Debug\110\lp\69\jl\classes.jar obj\Debug\110\lp\70\jl\classes.jar obj\Debug\110\lp\71\jl\classes.jar obj\Debug\110\lp\72\jl\classes.jar obj\Debug\110\lp\73\jl\classes.jar obj\Debug\110\lp\74\jl\classes.jar 
    Warning in obj\Debug\110\lp\74\jl\classes.jar:androidx/browser/browseractions/BrowserServiceFileProvider.class:
      Type `androidx.concurrent.futures.ResolvableFuture` was not found, it is required for default or static interface methods desugaring of `Landroidx/browser/browseractions/BrowserServiceFileProvider;saveBitmap(Landroid/content/Context;Landroid/graphics/Bitmap;Ljava/lang/String;I)Landroidx/concurrent/futures/ResolvableFuture;`
    Warning in obj\Debug\110\lp\74\jl\classes.jar:androidx/browser/trusted/ConnectionHolder.class:
      Type `androidx.concurrent.futures.CallbackToFutureAdapter` was not found, it is required for default or static interface methods desugaring of `Landroidx/browser/trusted/ConnectionHolder;getServiceWrapper()Lcom/google/common/util/concurrent/ListenableFuture;`
    Warning in synthesized for lambda desugaring:
      Type `androidx.concurrent.futures.CallbackToFutureAdapter$Resolver` was not found, it is required for default or static interface methods desugaring of `androidx.browser.trusted.-$$Lambda$ConnectionHolder$Rp3Hxy1AUk9cWatAvfzHyT3B2KI`
    Touching "obj\Debug\110\stamp\_CompileToDalvik.stamp".
    Deleting file "bin\Debug\com.companyname.app1.apk".
    Copying file from "C:\Users\***\Desktop\App1\obj\Debug\110\android\bin\com.companyname.app1.apk" to "C:\Users\***\Desktop\App1\bin\Debug\com.companyname.app1.apk".
    Creating "obj\Debug\110\android_debug_keystore.flag" because "AlwaysCreate" was specified.
    Deleting file "C:\Users\***\Desktop\App1\bin\Debug\com.companyname.app1-Signed.apk".
    E:\android-sdk\build-tools\30.0.2\zipalign.exe -p 4 "C:\Users\***\Desktop\App1\obj\Debug\110\android\bin\com.companyname.app1.apk" "bin\Debug\\com.companyname.app1-Signed.apk" 
    C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.25\bin\java.exe -jar "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\apksigner.jar" sign --ks "C:\Users\***\AppData\Local\Xamarin\Mono for Android\debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 23 --max-sdk-version 30  C:\Users\***\Desktop\App1\bin\Debug\com.companyname.app1-Signed.apk 
    Signed android package 'bin\Debug\com.companyname.app1-Signed.apk'
    Using cached value from RegisterTaskObject
    Found device: emulator-5554
    Creating "obj\Debug\110\upload.flag" because "AlwaysCreate" was specified.
    Done building project "App1.csproj".
    Build succeeded.
    2>Deployment was successful to Pixel_4_API_29.
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
    
    

    Also, 2 questions:

    • It seems like the Shared Runtime and Xamarin.Android API-XX Support packages are no longer installed onto the device. I've seen in this PR that this is expected behavior for the Shared Runtime. Is it also for the Xamarin.Android API-XX Support packages?
    • I've seen that the Visual Studio UI doesn't offer a toggle for the "Use shared runtime" settings which toggles the AndroidUseSharedRuntime property in the csproj. Is this property now obsolete and can be removed? The default template still includes it
    need-info Area: App+Library Build 
    opened by tipa 65
  • Support of AppBundles

    Support of AppBundles

    Hello,

    As we will soon have to support 64 bits as well as 32 bits applications (https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html, the support of Android AppBundles will become more and more necessary. I know we can compile an APK per ABIs but it is nothing as convenient as AppBundles.

    Also, it seems like the Play Store will support upload 500MB AppBundles (https://android-developers.googleblog.com/2018/10/playtime-2018.html) but this feature will maybe not be opened to traditional APKs.

    The support of AppBundles will be a real game changing for us so please share any plan you have.

    Thanks,

    enhancement Area: App+Library Build 
    opened by johnthiriet 61
  • App crashes with debugger attached

    App crashes with debugger attached

    Steps to Reproduce

    1. Debug app
    2. App crashes randomly

    Expected Behavior

    App runs without random crashes

    Actual Behavior

    When the App crashes it outputs a crash report, without having any useful stack trace to the App being at fault.

    =================================================================
    	Native Crash Reporting
    =================================================================
    Got a SIGSEGV while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries 
    used by your application.
    =================================================================
    
    =================================================================
    	Basic Fault Adddress Reporting
    =================================================================
    Memory around native instruction pointer (0x7414eaa494):0x7414eaa484  60 0b 00 35 88 66 40 f9 08 01 00 b4 0a 01 40 79  `..5.f@.......@y
    0x7414eaa494  a9 be 80 b9 5f 01 09 6b 8b 00 00 54 08 0d 09 8b  ...._..k...T....
    0x7414eaa4a4  16 05 40 f9 d6 0a 00 b5 7f 02 00 b9 e6 67 ff 97  [email protected]..
    0x7414eaa4b4  e0 03 15 aa 2e 59 fe 97 96 66 40 f9 f6 01 00 b4  .....Y...f@.....
    
    No native Android stacktrace (see debuggerd output).
    
    ===============================================04-03 13:07:12.816 E/mono-rt (28243): /proc/self/maps:
    ==================
    	Managed Stacktrace:
    =================================================================
    domain required for stack walk=================================================================
    
    04-03 13:07:12.817 E/mono-rt (28243): 12c00000-12cc0000 rw-p 00000000 00:05 13719                              /dev/ashmem/dalvik-main space (region space) (deleted)
    04-03 13:07:12.817 E/mono-rt (28243): 12cc0000-12f80000 ---p 000c0000 00:05 13719                              /dev/ashmem/dalvik-main space (region space) (deleted)
    04-03 13:07:12.817 E/mono-rt (28243): 12f80000-13940000 rw-p 00380000 00:05 13719                              /dev/ashmem/dalvik-main space (region space) (deleted)
    04-03 13:07:12.817 E/mono-rt (28243): 13940000-1d980000 ---p 00d40000 00:05 13719                              /dev/ashmem/dalvik-main space (region space) (deleted)
    04-03 13:07:12.817 E/mono-rt (28243): 1d980000-1db80000 rw-p 0ad80000 00:05 13719                              /dev/ashmem/dalvik-main space (region space) (deleted)
    04-03 13:07:12.817 E/mono-rt (28243): 1db80000-1dc80000 rw-p 0af80000 00:05 13719                              /dev/ashmem/dalvik-main space (region space) (deleted)
    04-03 13:07:12.817 E/mono-rt (28243): 1dc80000-52c00000 rw-p 0b080000 00:05 13719                              /dev/ashmem/dalvik-main space (region space) (deleted)
    04-03 13:07:12.817 E/mono-rt (28243): 70158000-70170000 rw-p 00000000 103:01 1310729                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70170000-70172000 r--p 00018000 103:01 1310729                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70172000-70173000 rw-p 00000000 103:01 1310735                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70173000-70174000 r--p 00001000 103:01 1310735                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70174000-70176000 rw-p 00000000 103:01 1310741                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70176000-70177000 r--p 00002000 103:01 1310741                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70177000-70178000 rw-p 00000000 103:01 1310747                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70178000-70179000 r--p 00001000 103:01 1310747                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70179000-7043d000 rw-p 00000000 103:01 1310753                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 7043d000-70451000 r--p 002c4000 103:01 1310753                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70451000-70586000 rw-p 00000000 103:01 1310759                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70586000-70598000 r--p 00135000 103:01 1310759                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70598000-705d7000 rw-p 00000000 103:01 1310765                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 705d7000-705da000 r--p 0003f000 103:01 1310765                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 705da000-70616000 rw-p 00000000 103:01 1310771                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70616000-70619000 r--p 0003c000 103:01 1310771                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 70619000-7067f000 rw-p 00000000 103:01 1310777                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.817 E/mono-rt (28243): 7067f000-70686000 r--p 00066000 103:01 1310777                           /data/dalvik-cache/arm64/system@[email protected]
    04-03 13:07:12.818 F/libc    (28243): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbc in tid 28304 (pool-4-thread-1), pid 28243 (.TrackMan.Range)
    

    When trying to debug with VS for Mac I only get:

    [mono-rt] /proc/self/maps:
    [mono-rt] 12c00000-13680000 rw-p 00000000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    [mono-rt] 13680000-137c0000 ---p 00a80000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    [mono-rt] 137c0000-15440000 rw-p 00bc0000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    [mono-rt] 15440000-15740000 ---p 02840000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    [mono-rt] 15740000-52c00000 rw-p 02b40000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    [mono-rt] 6f126000-6f400000 rw-p 00000000 103:0f 16                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f400000-6f416000 r--p 002da000 103:0f 16                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f416000-6f54b000 rw-p 00000000 103:0f 28                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f54b000-6f55d000 r--p 00135000 103:0f 28                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f55d000-6f59d000 rw-p 00000000 103:0f 34                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f59d000-6f5a0000 r--p 00040000 103:0f 34                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f5a0000-6f5e7000 rw-p 00000000 103:0f 43                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f5e7000-6f5eb000 r--p 00047000 103:0f 43                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f5eb000-6f651000 rw-p 00000000 103:0f 50                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f651000-6f658000 r--p 00066000 103:0f 50                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f658000-6f6b9000 rw-p 00000000 103:0f 53                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f6b9000-6f6c0000 r--p 00061000 103:0f 53                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f6c0000-6f704000 rw-p 00000000 103:0f 56                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f704000-6f70f000 r--p 00044000 103:0f 56                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 6f70f000-70326000 rw-p 00000000 103:0f 62                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 70326000-70386000 r--p 00c17000 103:0f 62                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 70386000-70510000 rw-p 00000000 103:0f 80                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 70510000-7052e000 r--p 0018a000 103:0f 80                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 7052e000-7053d000 rw-p 00000000 103:0f 86                                /data/dalvik-cache/arm64/system@[email protected]
    [mono-rt] 7053d000-7053f000 r--p 0000f000 103:0f 86                                /data/dalvik-cache/arm64/system@[email protected]
    [libc] Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbc in tid 27358 (AsyncTask #5), pid 27108 (.TrackMan.Range)
    

    Version Information

    Latest version of VS for Mac stable or VS2019 GA (was also an issue on VS2019 Preview 4.4)

    === Visual Studio Enterprise 2019 for Mac ===
    
    Version 8.0 (build 3001)
    Installation UUID: e39f69fe-f899-4e46-a9a8-17ff8f869cb3
    	GTK+ 2.24.23 (Raleigh theme)
    	Xamarin.Mac 5.6.0.2 (d16-0 / 040682909)
    
    	Package version: 518010003
    
    === Mono Framework MDK ===
    
    Runtime:
    	Mono 5.18.1.3 (2018-08/fdb26b0a445) (64-bit)
    	Package version: 518010003
    
    === NuGet ===
    
    Version: 4.8.2.5835
    
    === .NET Core ===
    
    Runtime: /usr/local/share/dotnet/dotnet
    Runtime Versions:
    	2.1.9
    	2.1.8
    	2.1.7
    	2.1.6
    	2.1.5
    SDK: /usr/local/share/dotnet/sdk/2.1.505/Sdks
    SDK Versions:
    	2.1.505
    	2.1.504
    	2.1.503
    	2.1.500
    	2.1.403
    MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/15.0/bin/Sdks
    
    === Xamarin.Profiler ===
    
    Version: 1.6.9
    Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
    
    === Updater ===
    
    Version: 11
    
    === Xamarin.Android ===
    
    Version: 9.2.0.5 (Visual Studio Enterprise)
    Android SDK: /Users/tci/Library/Android/sdk
    	Supported Android versions:
    		6.0 (API level 23)
    		7.0 (API level 24)
    		7.1 (API level 25)
    		8.1 (API level 27)
    
    SDK Tools Version: 26.1.1
    SDK Platform Tools Version: 28.0.1
    SDK Build Tools Version: 28.0.3
    
    Build Information: 
    Mono: mono/mono/2018-08-rc@5ad371dab1b
    Java.Interop: xamarin/java.interop/d16-0@c987483
    LibZipSharp: grendello/LibZipSharp/master@44de300
    LibZip: nih-at/libzip/rel-1-5-1@b95cf3f
    MXE: xamarin/mxe/xamarin@b9cbb535
    ProGuard: xamarin/proguard/master@905836d
    SQLite: xamarin/sqlite/3.26.0@325e91a
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-0@0a7edd6
    
    === Microsoft Mobile OpenJDK ===
    
    Java SDK: /Users/tci/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
    1.8.0-25
    Android Designer EPL code available here:
    https://github.com/xamarin/AndroidDesigner.EPL
    
    === Android Device Manager ===
    
    Version: 1.2.0.14
    Hash: 86df26f
    Branch: remotes/origin/d16-0
    Build date: 2019-03-27 18:41:02 UTC
    
    === Apple Developer Tools ===
    
    Xcode 10.1 (14460.46)
    Build 10B61
    
    === Xamarin.Mac ===
    
    Version: 5.6.0.25 (Visual Studio Enterprise)
    Hash: 50f75273
    Branch: d16-0
    Build date: 2019-03-05 11:50:33-0800
    
    === Xamarin.iOS ===
    
    Version: 12.6.0.25 (Visual Studio Enterprise)
    Hash: 50f75273
    Branch: d16-0
    Build date: 2019-03-05 11:50:33-0800
    
    === Xamarin Designer ===
    
    Version: 4.17.4.414
    Hash: 55b8d07ef
    Branch: remotes/origin/d16-0
    Build date: 2019-03-22 21:44:12 UTC
    
    === Xamarin Inspector ===
    
    Version: 1.4.3
    Hash: db27525
    Branch: 1.4-release
    Build date: Mon, 09 Jul 2018 21:20:18 GMT
    Client compatibility: 1
    
    === Build Information ===
    
    Release ID: 800003001
    Git revision: 16b11d379aeff65cd1e81d3616c267ad4251ad36
    Build date: 2019-03-28 13:14:24+00
    Build branch: master
    Xamarin extensions: efad41c7f410d8e6d43361236e0e778cf6f9b4a5
    
    === Operating System ===
    
    Mac OS X 10.13.6
    Darwin 17.7.0 Darwin Kernel Version 17.7.0
        Thu Dec 20 21:47:19 PST 2018
        root:xnu-4570.71.22~1/RELEASE_X86_64 x86_64
    
    
    

    Additional Information

    I got some help from @grendello to debug the issue and tried the following:

    1. Adding an environment.txt file to the App to increase what is being logged. That yielded the following log:
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=AppWindowToken{e06d450 token=Token{7deda13 ActivityRecord{b4e2102 u0 dk.TrackMan.Range/dk.TrackMan.SplashScreen t148}}})/@0x492bab0 - animation-leash)/@0xb2b8e08, nativeObject=515906067584, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=5a5d6a7 NavigationBar)/@0xe459edc - animation-leash)/@0xb93ad11, nativeObject=515907470240, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=512dde7 StatusBar)/@0xf8d1253 - animation-leash)/@0x7a88d03, nativeObject=516060250112, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=5a5d6a7 NavigationBar)/@0xe459edc - animation-leash)/@0x4904975, nativeObject=515934594048, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=e81e8ee SnapshotStartingWindow for taskId=148)/@0x94a536f - animation-leash)/@0xbccf4dc, nativeObject=515934593664, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Warning (5741) / System: A resource failed to call release. 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=AppWindowToken{e98764e token=Token{595ed49 ActivityRecord{9314750 u0 dk.TrackMan.Range/md552e608b944995f090b52594b40e05f58.RootView t148}}})/@0xb09a95a - animation-leash)/@0xde62136, nativeObject=515934883392, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=AppWindowToken{df4009d token=Token{1c10374 ActivityRecord{29d7f47 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}})/@0x8a6c410 - animation-leash)/@0x6b5401a, nativeObject=515907473120, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x8b8872f - animation-leash)/@0x29bcec5, nativeObject=515887426112, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=fbb672b dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0xf074b07 - animation-leash)/@0x4b057d2, nativeObject=515934883104, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x84390a3 - animation-leash)/@0x9ba7759, nativeObject=515882971328, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=fbb672b dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0xf074b07 - animation-leash)/@0x23303f7, nativeObject=516060254240, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x84390a3 - animation-leash)/@0xb794ccd, nativeObject=516060254720, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=95ae8c9 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x33596da - animation-leash)/@0xf21e801, nativeObject=515934885216, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x7e646a6 - animation-leash)/@0x8daec94, nativeObject=515888486016, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=95ae8c9 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x33596da - animation-leash)/@0xadd5cf5, nativeObject=515887430048, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x7e646a6 - animation-leash)/@0xf9c98fb, nativeObject=516582275232, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=98b865c dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0xe78ac48 - animation-leash)/@0x2d6c7, nativeObject=515888485632, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x39044f4 - animation-leash)/@0xdeb2692, nativeObject=515882981600, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=98b865c dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0xe78ac48 - animation-leash)/@0x16b3e8c, nativeObject=515888492448, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x39044f4 - animation-leash)/@0x910f5ea, nativeObject=515882982176, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=512dde7 StatusBar)/@0xf8d1253 - animation-leash)/@0x23e053, nativeObject=515888480544, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=5a5d6a7 NavigationBar)/@0xe459edc - animation-leash)/@0x1a5b68e, nativeObject=515882975168, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=512dde7 StatusBar)/@0xf8d1253 - animation-leash)/@0x45a3f9, nativeObject=515230059392, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=5a5d6a7 NavigationBar)/@0xe459edc - animation-leash)/@0xd40f2ec, nativeObject=516060256160, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=fa99816 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x79f1fa2 - animation-leash)/@0x7da7d69, nativeObject=515887425344, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x27393ee - animation-leash)/@0x4dcef1c, nativeObject=515882982944, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=AppWindowToken{df4009d token=Token{1c10374 ActivityRecord{29d7f47 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}})/@0x8a6c410 - animation-leash)/@0xd2e8395, nativeObject=515888491968, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=AppWindowToken{e98764e token=Token{595ed49 ActivityRecord{9314750 u0 dk.TrackMan.Range/md552e608b944995f090b52594b40e05f58.RootView t148}}})/@0xb09a95a - animation-leash)/@0xa1843e4, nativeObject=515888487840, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x27393ee - animation-leash)/@0xeef1702, nativeObject=515883772192, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=AppWindowToken{e98764e token=Token{595ed49 ActivityRecord{9314750 u0 dk.TrackMan.Range/md552e608b944995f090b52594b40e05f58.RootView t148}}})/@0xb09a95a - animation-leash)/@0x6a97075, nativeObject=516060257984, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=AppWindowToken{4c9d381 token=Token{b788368 ActivityRecord{9cbf68b u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}})/@0xeab8444 - animation-leash)/@0x755deae, nativeObject=516060257504, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Debug (5741) / SurfaceControl: finalize(protected), animation-leash is released by finalize, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x9e9bf3 - animation-leash)/@0x4803b29, nativeObject=515934888768, caller=java.lang.Daemons$FinalizerDaemon.doFinalize:250 java.lang.Daemons$FinalizerDaemon.runInternal:237 java.lang.Daemons$Daemon.run:103 java.lang.Thread.run:764 <bottom of call stack> <bottom of call stack> <bottom of call stack> 
    Info (5741) / AfterimageCompensationService: BRIGHTNESS = 76
    Debug (5741) : mAFPC_Read - w = 1080, h = 2280, s = 8, f = 4, s_size = 9922560, luminance = 76, count = 82, captureOrientation = 0
    Verbose (5227) / APM_AudioPolicyManager: AudioPolicyManager:setRecordSilenced(uid:10024, silenced:1)
    Debug (5741) / CustomFrequencyManagerService: FrequencyrequestList.getNextSchedTuneBoostRequest, index: 0
    Debug (5741) / InputReader: Input event(7): value=1 when=84994.634821
    Debug (5741) / InputReader: Input event(7): value=1 when=84994.634821
    Info (5741) / InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.375 ] when=84994.634821
    Info (5741) / clp-JNI: Add pinfo.  (channel) 29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView (server) (pkg) AppWindowToken{4c9d381 token=Token{b788368 ActivityRecord{9cbf68b u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}} 31484 10243 (action) 0
    Info (5741) / clp-JNI: Add pinfo end.
    Info (5741) / InputDispatcher: Delivering touch to (31484): action: 0x0, displayId: 0, '29a8674', toolType: 1
    Info (5741) / Pageboost: Launcher App Execution
    Info (5741) / Pageboost: vramdisk hit dk.TrackMan.Range
    Debug (31484) / ViewRootImpl@c6e57c[ActivityFlowHostView]: ViewPostIme pointer 0
    Debug (5741) / WifiTrafficPoller: TrafficStats TxPkts=119237 RxPkts=279553 TxBytes=17971770 RxBytes=362284066 , Foreground uid=10243 pkgName=dk.TrackMan.Range TxPackets=7141 RxPackets=8949 TxBytes=657173 RxBytes=7544180
    Debug (5741) / WifiPermissionsUtil: canAccessScanResults: pkgName = android, uid = 1000
    Debug (5741) / InputReader: Input event(7): value=0 when=84994.726355
    Debug (5741) / InputReader: Input event(7): value=0 when=84994.726355
    Info (5741) / InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=84994.726355
    Info (5741) / clp-JNI: Add pinfo.  (channel) 29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView (server) (pkg) AppWindowToken{4c9d381 token=Token{b788368 ActivityRecord{9cbf68b u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}} 31484 10243 (action) 1
    Info (5741) / clp-JNI: Add pinfo end.
    Info (5741) / InputDispatcher: Delivering touch to (31484): action: 0x1, displayId: 0, '29a8674', toolType: 1
    Debug (31484) / ViewRootImpl@c6e57c[ActivityFlowHostView]: ViewPostIme pointer 1
    Debug (5741) / WifiPermissionsUtil: canAccessScanResults: pkgName = com.sec.android.sdhms, uid = 1000
    Error (5231) / BufferQueueProducer: [dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView[31484]#1] disconnect: not connected (req=1)
    Warning (31484) / libEGL: EGLNativeWindowType 0x780764b010 disconnect failed
    Debug (31484) / OpenGLRenderer: eglDestroySurface = 0x780ac15780, 0x780764b000
    Debug (31484) / ViewRootImpl@c6e57c[ActivityFlowHostView]: dispatchDetachedFromWindow
    Debug (31484) / ViewRootImpl@c6e57c[ActivityFlowHostView]: Surface release. android.view.ViewRootImpl.doDie:7944 android.view.ViewRootImpl.die:7912 android.view.WindowManagerGlobal.removeViewLocked:497 android.view.WindowManagerGlobal.removeView:435 android.view.WindowManagerImpl.removeViewImmediate:124 android.app.Dialog.dismissDialog:518 android.app.Dialog.dismiss:501 mono.android.view.View_OnClickListenerImplementor.n_onClick:-2 
    Verbose (5741) / WindowManager: Remove Window{29a8674 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView}: mSurfaceController=Surface(name=dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView[31484])/@0xfa667e3 mAnimatingExit=false mRemoveOnExit=false mHasSurface=true surfaceShowing=true isAnimationSet=false app-animation=false mWillReplaceWindow=false inPendingTransaction=false mDisplayFrozen=false callers=com.android.server.wm.WindowState.removeIfPossible:2710 com.android.server.wm.WindowManagerService.removeWindow:1921 com.android.server.wm.Session.remove:253 android.view.IWindowSession$Stub.onTransact:261 com.android.server.wm.Session.onTransact:186 android.os.Binder.execTransact:739 
    Info (5741) / WindowManager: Cancelling animation restarting=true, leash=null, surface=Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e, parent=Surface(name=AppWindowToken{4c9d381 token=Token{b788368 ActivityRecord{9cbf68b u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}})/@0xeab8444, caller=com.android.server.wm.SurfaceAnimator.startAnimation:119 com.android.server.wm.WindowContainer.startAnimation:1213 com.android.server.wm.WindowState.startAnimation:5783 com.android.server.wm.WindowState.startAnimation:5766 com.android.server.wm.WindowStateAnimator.applyAnimationLocked:1785 
    Info (5741) / WindowManager: Reparenting to leash, surface=Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e, caller=com.android.server.wm.SurfaceAnimator.startAnimation:127 com.android.server.wm.WindowContainer.startAnimation:1213 com.android.server.wm.WindowState.startAnimation:5783 com.android.server.wm.WindowState.startAnimation:5766 com.android.server.wm.WindowStateAnimator.applyAnimationLocked:1785 
    Info (5231) / SurfaceFlinger: id=982 createSurf (6080x6080),2 flag=4, Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e - animation-leash#0
    Debug (5741) / SurfaceControl: reparent is called, sc=Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e, newParentHandle=android.os.BinderProxy@fa83710, transaction=android.view.SurfaceControl$Transaction@c4c300c, caller=com.android.server.wm.SurfaceAnimator.createAnimationLeash:387 com.android.server.wm.SurfaceAnimator.startAnimation:127 com.android.server.wm.WindowContainer.startAnimation:1213 com.android.server.wm.WindowState.startAnimation:5783 com.android.server.wm.WindowState.startAnimation:5766 com.android.server.wm.WindowStateAnimator.applyAnimationLocked:1785 com.android.server.wm.WindowState.removeIfPossible:2804 
    Verbose (5741) / WindowManager: Changing focus from Window{29a8674 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView EXITING} to Window{7066e14 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView} Callers=com.android.server.wm.WindowState.setupWindowForRemoveOnExit:2860 com.android.server.wm.WindowState.removeIfPossible:2831 com.android.server.wm.WindowState.removeIfPossible:2710 com.android.server.wm.WindowManagerService.removeWindow:1921 
    Debug (5741) / StatusBarManagerService: notifyRequestedSystemKey recent=false home=false
    Info (5741) / WindowManager: Cancelling animation restarting=true, leash=null, surface=Surface(name=Dim Layer for - Task=148)/@0x39b036a, parent=Surface(name=Task=148)/@0xb7b4d29, caller=com.android.server.wm.SurfaceAnimator.startAnimation:119 com.android.server.wm.-$$Lambda$yACUZqn1Ak-GL14-Nu3kHUSaLX0.startAnimation:0 com.android.server.wm.Dimmer.startAnim:406 com.android.server.wm.Dimmer.startDimExit:393 com.android.server.wm.Dimmer.updateDims:350 
    Info (5741) / WindowManager: Reparenting to leash, surface=Surface(name=Dim Layer for - Task=148)/@0x39b036a, caller=com.android.server.wm.SurfaceAnimator.startAnimation:127 com.android.server.wm.-$$Lambda$yACUZqn1Ak-GL14-Nu3kHUSaLX0.startAnimation:0 com.android.server.wm.Dimmer.startAnim:406 com.android.server.wm.Dimmer.startDimExit:393 com.android.server.wm.Dimmer.updateDims:350 
    Info (5231) / SurfaceFlinger: id=983 createSurf (6080x6080),2 flag=4, Surface(name=Dim Layer for - Task=148)/@0x39b036a - animation-leash#0
    Debug (5741) / SurfaceControl: reparent is called, sc=Surface(name=Dim Layer for - Task=148)/@0x39b036a, newParentHandle=android.os.BinderProxy@91a4c0e, transaction=android.view.SurfaceControl$Transaction@762117d, caller=com.android.server.wm.SurfaceAnimator.createAnimationLeash:387 com.android.server.wm.SurfaceAnimator.startAnimation:127 com.android.server.wm.-$$Lambda$yACUZqn1Ak-GL14-Nu3kHUSaLX0.startAnimation:0 com.android.server.wm.Dimmer.startAnim:406 com.android.server.wm.Dimmer.startDimExit:393 com.android.server.wm.Dimmer.updateDims:350 com.android.server.wm.Task.prepareSurfaces:902 
    Debug (5231) / Layer: [29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView#0]::reparent oldParent:[AppWindowToken{4c9d381 token=Token{b788368 ActivityRecord{9cbf68b u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}}#0], newParent:[Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e - animation-leash#0]
    Debug (5741) / InputDispatcher: Focus left window (31484): 29a8674 0
    Debug (5741) / InputDispatcher: Focus entered window (31484): 7066e14 0
    Debug (5741) / InputTransport: Input channel destroyed: fd=471
    Debug (5741) / WindowManager: reportFocusChangedSerialized, focused=true, inTouchMode=true, win=Window{7066e14 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView}
    Debug (5741) / WindowManager: reportFocusChangedSerialized, focused=false, inTouchMode=true, win=Window{29a8674 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView EXITING}
    Debug (31484) / InputTransport: Input channel destroyed: fd=95
    Debug (31484) / ViewRootImpl@793d1f0[ActivityFlowHostView]: MSG_WINDOW_FOCUS_CHANGED 1 1
    Debug (5741) / WindowManager: setSystemUiVisibility: vis= 0x9016, fullscreenVis= 0x0, dockedVis= 0x0, win=Window{7066e14 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView}
    Debug (5231) / Layer: [Dim Layer for - Task=148#0]::reparent oldParent:[Task=148#0], newParent:[Surface(name=Dim Layer for - Task=148)/@0x39b036a - animation-leash#0]
    Debug (17759) / LightBarController: onNavigationVisibilityChanged : vis = 9016, nbModeChanged = false navigationBarMode = 4
    Debug (5741) / SamsungPhoneWindowManager: adjustSystemUiVisibilityLw: vis=0x9016
    Debug (5741) / InputManager-JNI: setSystemUiVisibility dexmode: false changed: true displayid: 0 visibility: 0x9016 DD: 0x9016 OD: 0x0
    Debug (31484) / InputMethodManager: prepareNavigationBarInfo() DecorView@8e09b84[ActivityFlowHostView]
    Debug (31484) / InputMethodManager: getNavigationBarColor() -855310
    Debug (31484) / InputMethodManager: prepareNavigationBarInfo() DecorView@8e09b84[ActivityFlowHostView]
    Debug (31484) / InputMethodManager: getNavigationBarColor() -855310
    Verbose (31484) / InputMethodManager: Starting input: tba=dk.TrackMan.Range ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : false , NavTrans : false
    Debug (31484) / InputMethodManager: startInputInner - Id : 0
    Info (31484) / InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
    Debug (5741) / InputMethodManagerService: startInputOrWindowGainedFocus : windowGainedFocus 
    Debug (5741) / InputMethodManagerService: windowGainedFocus: destinationUserId (getCallingUid) = 0
    Debug (5741) / InputMethodManagerService: windowGainedFocus: currentUserId=0
    Debug (5741) / InputMethodManagerService: windowGainedFocus: mCurrentFocusedUserId=0
    Debug (5741) / InputMethodManagerService: windowGainedFocus : lock - currentUserId = 0 destinationUserId = 0
    Debug (5741) / InputMethodManagerService: windowGainedFocus : mCurrentFocusedUserId - 0 and mSecureKeypadEnabled - false, userSwitched - false
    Verbose (5741) / InputMethodManagerService: windowGainedFocus : reason=WINDOW_FOCUS_GAIN client=android.os.BinderProxy@26c94f7 inputContext=null missingMethods= attribute=android.view.inputmethod.EditorInfo@e41b43c nm = dk.TrackMan.Range controlFlags=#101 softInputMode=#12 windowFlags=#81810100
    Debug (5741) / InputMethodManagerService: checkDisplayOfStartInputAndUpdateKeyboard display Id 0last 0
    Debug (5741) / InputMethodManagerService: setCurrentInputInfo - inputContext : null eidtorInfo : android.view.inputmethod.EditorInfo@e41b43c missingMethods : 0
    Debug (5741) / InputTransport: Input channel constructed: fd=471
    Debug (5741) / InputTransport: Input channel destroyed: fd=471
    Debug (31484) / InputTransport: Input channel constructed: fd=95
    Debug (31484) / InputTransport: Input channel destroyed: fd=116
    Info (19520) / InputMethodWrapper:  call dispatchStartInputWithToken
    Info (19520) / InputMethodService: dispatchStartInputWithToken
    Info (19520) / SKBD_Performance: [IIManager] [PF_CL][onFinishInput] 195615
    Debug (19520) / InputMethodService: checkDisplayOfStartInputAndUpdateKeyboard display Id 0last 0
    Error (31484) / ViewRootImpl: sendUserActionEvent() returned.
    Info (19520) / SKBD: SamsungKeypad [IMI] onStartInput - caller pid : 31484, caller uid : 10243
    Info (5741) / WindowManager: reset, Reparenting to original parent, shouldDeferScheduleAnimation=false, destroyLeash=true, surface=Surface(name=Dim Layer for - Task=148)/@0x39b036a, parent=Surface(name=Task=148)/@0xb7b4d29, parentNativeHandle=android.os.BinderProxy@49495c2, caller=com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:94 com.android.server.wm.-$$Lambda$SurfaceAnimator$SIBia0mND666K8lMCPsoid8pUTI.run:4 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1:101 com.android.server.wm.-$$Lambda$SurfaceAnimator$vdRZk66hQVbQCvVXEaQCT1kVmFc.onAnimationFinished:4 com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0:65 
    Debug (5741) / SurfaceControl: reparent is called, sc=Surface(name=Dim Layer for - Task=148)/@0x39b036a, newParentHandle=android.os.BinderProxy@49495c2, transaction=android.view.SurfaceControl$Transaction@762117d, caller=com.android.server.wm.SurfaceAnimator.reset:328 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:94 com.android.server.wm.-$$Lambda$SurfaceAnimator$SIBia0mND666K8lMCPsoid8pUTI.run:4 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1:101 com.android.server.wm.-$$Lambda$SurfaceAnimator$vdRZk66hQVbQCvVXEaQCT1kVmFc.onAnimationFinished:4 com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0:65 com.android.server.wm.-$$Lambda$LocalAnimationAdapter$X--EomqUvw4qy89IeeTFTH7aCMo.run:4 
    Debug (5741) / SurfaceControl: destroy(transaction), animation-leash is destroyed, sc=Surface(name=Surface(name=Dim Layer for - Task=148)/@0x39b036a - animation-leash)/@0x432d62f, transaction=android.view.SurfaceControl$Transaction@762117d, caller=com.android.server.wm.SurfaceAnimator.reset:335 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:94 com.android.server.wm.-$$Lambda$SurfaceAnimator$SIBia0mND666K8lMCPsoid8pUTI.run:4 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1:101 com.android.server.wm.-$$Lambda$SurfaceAnimator$vdRZk66hQVbQCvVXEaQCT1kVmFc.onAnimationFinished:4 com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0:65 com.android.server.wm.-$$Lambda$LocalAnimationAdapter$X--EomqUvw4qy89IeeTFTH7aCMo.run:4 
    Info (5231) / SurfaceFlinger: id=980 Removed Dim Layer for - Task=148#0 (0/73)
    Info (5741) / WindowManager: reset, Reparenting to original parent, shouldDeferScheduleAnimation=false, destroyLeash=true, surface=Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e, parent=Surface(name=AppWindowToken{4c9d381 token=Token{b788368 ActivityRecord{9cbf68b u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}})/@0xeab8444, parentNativeHandle=android.os.BinderProxy@f2674a4, caller=com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:94 com.android.server.wm.-$$Lambda$SurfaceAnimator$SIBia0mND666K8lMCPsoid8pUTI.run:4 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1:101 com.android.server.wm.-$$Lambda$SurfaceAnimator$vdRZk66hQVbQCvVXEaQCT1kVmFc.onAnimationFinished:4 com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0:65 
    Debug (5741) / SurfaceControl: reparent is called, sc=Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e, newParentHandle=android.os.BinderProxy@f2674a4, transaction=android.view.SurfaceControl$Transaction@c4c300c, caller=com.android.server.wm.SurfaceAnimator.reset:328 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:94 com.android.server.wm.-$$Lambda$SurfaceAnimator$SIBia0mND666K8lMCPsoid8pUTI.run:4 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1:101 com.android.server.wm.-$$Lambda$SurfaceAnimator$vdRZk66hQVbQCvVXEaQCT1kVmFc.onAnimationFinished:4 com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0:65 com.android.server.wm.-$$Lambda$LocalAnimationAdapter$X--EomqUvw4qy89IeeTFTH7aCMo.run:4 
    Debug (5741) / SurfaceControl: destroy(transaction), animation-leash is destroyed, sc=Surface(name=Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e - animation-leash)/@0x1c68209, transaction=android.view.SurfaceControl$Transaction@c4c300c, caller=com.android.server.wm.SurfaceAnimator.reset:335 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:94 com.android.server.wm.-$$Lambda$SurfaceAnimator$SIBia0mND666K8lMCPsoid8pUTI.run:4 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1:101 com.android.server.wm.-$$Lambda$SurfaceAnimator$vdRZk66hQVbQCvVXEaQCT1kVmFc.onAnimationFinished:4 com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0:65 com.android.server.wm.-$$Lambda$LocalAnimationAdapter$X--EomqUvw4qy89IeeTFTH7aCMo.run:4 
    Error (5741) / WindowManager: win=Window{29a8674 u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.AppWindowToken.destroySurfaces:870 com.android.server.wm.AppWindowToken.destroySurfaces:851 com.android.server.wm.WindowState.onExitAnimationDone:5366 com.android.server.wm.WindowStateAnimator.onAnimationFinished:319 com.android.server.wm.WindowState.onAnimationFinished:5788 com.android.server.wm.-$$Lambda$yVRF8YoeNdTa8GR1wDStVsHu8xM.run:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:97 
    Info (5741) / WindowManager: Destroying surface Surface(name=dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView[31484])/@0xfa667e3 called by com.android.server.wm.WindowStateAnimator.destroySurface:1880 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:838 com.android.server.wm.WindowState.destroySurfaceUnchecked:3775 com.android.server.wm.WindowState.destroySurface:3756 com.android.server.wm.AppWindowToken.destroySurfaces:870 com.android.server.wm.AppWindowToken.destroySurfaces:851 com.android.server.wm.WindowState.onExitAnimationDone:5366 com.android.server.wm.WindowStateAnimator.onAnimationFinished:319 
    Info (5231) / SurfaceFlinger: id=978 Removed dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView[31484]#1 (0/72)
    Debug (5741) / WindowManager: clearSavedLeashOnCommit, savedLeash=Surface(name=Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e - animation-leash)/@0x1c68209, caller=com.android.server.wm.WindowContainer.removeImmediately:337 com.android.server.wm.WindowState.removeImmediately:2622 com.android.server.wm.WindowState.destroySurface:3759 com.android.server.wm.AppWindowToken.destroySurfaces:870 com.android.server.wm.AppWindowToken.destroySurfaces:851 com.android.server.wm.WindowState.onExitAnimationDone:5366 
    Info (5741) / SensorService: [REARLIGHT] lux value : 102, code value : 109
    Warning (5231) / SurfaceFlinger: Attempting to set client state on removed layer: dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView[31484]#1 [s.what : 64]
    Debug (5231) / Layer: [29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView#0]::reparent oldParent:[Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e - animation-leash#0], newParent:[AppWindowToken{4c9d381 token=Token{b788368 ActivityRecord{9cbf68b u0 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView t148}}}#0]
    Warning (5231) / SurfaceFlinger: Attempting to set client state on removed layer: Dim Layer for - Task=148#0 [s.what : 65536]
    Warning (5231) / SurfaceFlinger: Attempting to destroy on removed layer: dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView[31484]#1
    Info (5231) / SurfaceFlinger: id=977 Removed 29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView#0 (2/71)
    Warning (5231) / SurfaceFlinger: Attempting to destroy on removed layer: Dim Layer for - Task=148#0
    Info (5231) / SurfaceFlinger: id=983 Removed Surface(name=Dim Layer for - Task=148)/@0x39b036a - animation-leash#0 (1/70)
    Info (5231) / SurfaceFlinger: id=982 Removed Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e - animation-leash#0 (2/69)
    Info (5231) / Layer: id=977 onRemoved 29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView#0 
    Info (5231) / Layer: id=982 onRemoved Surface(name=29a8674 dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView)/@0x5cd4f5e - animation-leash#0 
    Info (5231) / Layer: id=980 onRemoved Dim Layer for - Task=148#0 
    Info (5231) / Layer: id=983 onRemoved Surface(name=Dim Layer for - Task=148)/@0x39b036a - animation-leash#0 
    Info (5231) / Layer: id=978 onRemoved dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView[31484]#1 
    Debug (5741) / WifiStateMachine: enter getWifiLinkLayerStats
    Info (5741) / WifiVendorHal: getWifiLinkLayerStats(l.2965) before calling iface.getLinkLayerStats
    Info (5212) / [email protected]: enter getLinkLayerStats
    Info (5212) / [email protected]: enter getLinkLayerStatsInternal
    Info (5231) / SurfaceFlinger: Display 0 HWC layers:
    Info (5231) / SurfaceFlinger:     type    |    handle    | flag |  format   |   source crop (l,t,r,b)    |         frame       | name 
    Info (5231) / SurfaceFlinger: ------------+--------------+------+-----------+----------------------------+---------------------+------
    Info (5231) / SurfaceFlinger:  SolidColor |              | 0004 |  Unknown  |   0.0    0.0   -1.0   -1.0 |    0    0 1080  112 | Letterbox - top#1
    Info (5231) / SurfaceFlinger:      Device | 0x7823642180 | 0002 | RGBA_8888 |   0.0    0.0 1080.0 2168.0 |    0  112 1080 2280 | dk.TrackMan.Range/md51bc303ec2e30c20[...]1a9e67.ActivityFlowHostView[31484]#0
    Info (5231) / SurfaceFlinger:      Device | 0x7823049460 | 0000 | RGBA_8888 |   0.0    0.0   67.0  431.0 | 1013  870 1080 1301 | com.samsung.android.app.cocktailbars[...]rservice.CocktailBarService[20894]#0
    Info (5231) / SurfaceFlinger: 
    Info (5212) / [email protected]: Successfully getLinkLayerStats.
    Info (5741) / WifiVendorHal: getWifiLinkLayerStats(l.2965) after calling iface.getLinkLayerStats
    Info (5741) / WifiStateMachine: checkScoreBasedQuality -  mPreviousScore[0]:72 mPreviousScore[1]:72 mPreviousScore[2]:73 s2Score:73mPrevoiusScoreAverage:72
    Error (5741) / Watchdog: !@Sync 2828 [2019-04-03 15:38:44.501] FD count : 584
    Info (5741) / SensorService: [REARLIGHT] lux value : 101, code value : 109
    Verbose (5227) / APM_AudioPolicyManager: AudioPolicyManager:setRecordSilenced(uid:10041, silenced:1)
    Debug (5741) / WifiPermissionsUtil: canAccessScanResults: pkgName = android, uid = 1000
    Debug (17759) / SecStatusBarWifiView: updateState: WifiIconState(resId=2131232608, visible=true, activityId=2131232613)
    Debug (5741) / CustomFrequencyManagerService: FrequencyrequestList.getNextSchedTuneBoostRequest, index: 0
    Warning (31484) / .TrackMan.Rang: 0xebadde09 skipped times: 0
    Error (31484) / mono-rt: /proc/self/maps:
    Error (31484) / mono-rt: 12c00000-135c0000 rw-p 00000000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    Error (31484) / mono-rt: 135c0000-13740000 ---p 009c0000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    Error (31484) / mono-rt: 13740000-17b00000 rw-p 00b40000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    Error (31484) / mono-rt: 17b00000-17b80000 ---p 04f00000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    Error (31484) / mono-rt: 17b80000-52c00000 rw-p 04f80000 00:05 31230                              /dev/ashmem/dalvik-main space (region space)_5189_5189 (deleted)
    Error (31484) / mono-rt: 6f126000-6f400000 rw-p 00000000 103:0f 16                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f400000-6f416000 r--p 002da000 103:0f 16                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f416000-6f54b000 rw-p 00000000 103:0f 28                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f54b000-6f55d000 r--p 00135000 103:0f 28                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f55d000-6f59d000 rw-p 00000000 103:0f 34                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f59d000-6f5a0000 r--p 00040000 103:0f 34                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f5a0000-6f5e7000 rw-p 00000000 103:0f 43                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f5e7000-6f5eb000 r--p 00047000 103:0f 43                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f5eb000-6f651000 rw-p 00000000 103:0f 50                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f651000-6f658000 r--p 00066000 103:0f 50                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f658000-6f6b9000 rw-p 00000000 103:0f 53                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f6b9000-6f6c0000 r--p 00061000 103:0f 53                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f6c0000-6f704000 rw-p 00000000 103:0f 56                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f704000-6f70f000 r--p 00044000 103:0f 56                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 6f70f000-70326000 rw-p 00000000 103:0f 62                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 70326000-70386000 r--p 00c17000 103:0f 62                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 70386000-70510000 rw-p 00000000 103:0f 80                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 70510000-7052e000 r--p 0018a000 103:0f 80                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 7052e000-7053d000 rw-p 00000000 103:0f 86                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / mono-rt: 7053d000-7053f000 r--p 0000f000 103:0f 86                                /data/dalvik-cache/arm64/system@[email protected]
    Error (31484) / libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbc in tid 31527 (AsyncTask #4), pid 31484 (.TrackMan.Range)
    Info (31859) / crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
    Info (5407) : received crash request for pid 31527
    Info (31859) / crash_dump64: performing dump of process 31484 (target tid = 31527)
    Error (31859) / DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Error (31859) / DEBUG: Build fingerprint: 'samsung/beyond1lteeea/beyond1:9/PPR1.180610.011/G973FXXU1ASCA:user/release-keys'
    Error (31859) / DEBUG: Revision: '26'
    Error (31859) / DEBUG: ABI: 'arm64'
    Error (31859) / DEBUG: pid: 31484, tid: 31527, name: AsyncTask #4  >>> dk.TrackMan.Range <<<
    Error (31859) / DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xbc
    Error (31859) / DEBUG: Cause: null pointer dereference
    Error (31859) / DEBUG:     x0  0000000000000000  x1  000000783e57c648  x2  00000078264e7148  x3  0000000000000008
    Error (31859) / DEBUG:     x4  0000000000000000  x5  0000000000000002  x6  000000780f84c698  x7  0000000000000009
    Error (31859) / DEBUG:     x8  000000783e59e898  x9  0000000000000001  x10 0000000000000001  x11 0000007820000000
    Error (31859) / DEBUG:     x12 00000000000000a3  x13 0000007820000000  x14 000000000000000d  x15 aaaaaaaaaaaaaaab
    Error (31859) / DEBUG:     x16 000000782e3589c0  x17 00000078cc6c794c  x18 0000000000000000  x19 00000078264e7148
    Error (31859) / DEBUG:     x20 000000783e57c648  x21 0000000000000000  x22 00000078200a3e06  x23 0000007840506b40
    Error (31859) / DEBUG:     x24 0000000000000000  x25 0000007812997990  x26 0000000000000000  x27 000000000000000b
    Error (31859) / DEBUG:     x28 0000000000000000  x29 00000078264e7130
    Error (31859) / DEBUG:     sp  00000078264e70a0  lr  000000782e1af484  pc  000000782e1af494
    Error (31859) / DEBUG: 
    Error (31859) / DEBUG: backtrace:
    Error (31859) / DEBUG:     #00 pc 0000000000199494  /data/app/Mono.Android.DebugRuntime-lFcdnuZ4gxhgNloh2F5UDw==/lib/arm64/libmonosgen-64bit-2.0.so
    Debug (5741) / WifiConnectivityMonitor.DnsPingerHandler: setCurrentLinkProperties: lp={InterfaceName: wlan0 LinkAddresses: [fe80::aa15:4cdf:530c:59b1/64,192.168.17.3/24,]  Routes: [fe80::/64 -> :: wlan0,192.168.17.0/24 -> 0.0.0.0 wlan0,0.0.0.0/0 -> 192.168.17.1 wlan0,] DnsAddresses: [83.136.89.6,83.136.89.4,] UsePrivateDns: false PrivateDnsServerName: null Domains: null MTU: 0 TcpBufferSizes: 524288,1048576,4194304,524288,1048576,4194304}
    Debug (5741) / WifiPermissionsUtil: canAccessScanResults: pkgName = android, uid = 1000
    Debug (5741) / WifiPermissionsUtil: canAccessScanResults: pkgName = android, uid = 1000
    Debug (5741) / WifiConnectivityMonitor.DnsPingerHandler: #1 GW MAC address found in ARP table.0 msec.
    Error (5407) : Tombstone written to: /data/tombstones/tombstone_02
    Info (5741) / BootReceiver: Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
    Warning (5741) / ActivityManager: crash : dk.TrackMan.Range,0
    Error (5181) / audit: type=1701 audit(1554298726.009:1420): auid=4294967295 uid=10243 gid=10243 ses=4294967295 subj=u:r:untrusted_app_27:s0:c512,c768 pid=31484 comm=4173796E635461736B202334 exe="/system/bin/app_process64" sig=11 res=1
    Warning (5741) / ActivityManager:   Force finishing activity dk.TrackMan.Range/md51bc303ec2e30c20fab671d92b41a9e67.ActivityFlowHostView
    
    1. @grendello then asked me to try run the App with lldb. However, I didn't get that to work, it just made my App hang on splash screen and left some props on the device that made the subsequent launches of the app fail. I followed the instructions here: https://github.com/mono/lldb-binaries had to mess with the xa-lldb script to make it pick up the correct Main Activity and make it use msbuild because xabuild is not present on my machine.

    2. After the failed lldb attempt, @grendello asked me to run msbuild /bl /t:_Gdb on the App project, which didn't seem to crash the App. Which lead @grendello to the conclusion: "that means it might be a problem with sdb or triggered by it". And here we are.

    I cannot attach a repro sample, because I don't know which part of it actually triggers the App to blow up, since there is no stack trace to go from.

    This issue seems to mainly happen on arm64 devices. My Nexus 5, doesn't have any issues with debugging.

    Other people on Gitter.im had a similar issue.

    bug regression Area: Mono Runtime 
    opened by Cheesebaron 60
  • System.Runtime.CompilerServices.Unsafe linked away in release leading to crashes

    System.Runtime.CompilerServices.Unsafe linked away in release leading to crashes

    This is most probably related to https://github.com/aspnet/EntityFrameworkCore/issues/8922 . None of the workarounds there help. The major problem is that it's simply impossible to force the linker to preserve an entire assembly.

    Steps to Reproduce

    1. Use a library, such as Microsoft.Extensions.Identity.Stores, which (indirectly) depends on System.Runtime.CompilerServices.Unsafe, in a Xamarin.Android project;
    2. Build the project in Release - ensure linking is not set to "None";
    3. Run it on a device.

    Expected Behavior

    The application runs.

    Actual Behavior

    The application does not load at all with: Could not load assembly 'System.Runtime.CompilerServices.Unsafe' during startup registration.

    Version Information

    Microsoft Visual Studio Community 2017 Version 15.5.3 VisualStudio.15.Release/15.5.3+27130.2020 Microsoft .NET Framework Version 4.7.02558

    Installed Version: Community

    Visual Basic 2017 00369-60000-00001-AA416 Microsoft Visual Basic 2017

    Visual C# 2017 00369-60000-00001-AA416 Microsoft Visual C# 2017

    Visual C++ 2017 00369-60000-00001-AA416 Microsoft Visual C++ 2017

    Visual F# 4.1 00369-60000-00001-AA416 Microsoft Visual F# 4.1

    Application Insights Tools for Visual Studio Package 8.10.01106.1 Application Insights Tools for Visual Studio

    ASP.NET and Web Tools 2017 15.0.31127.0 ASP.NET and Web Tools 2017

    ASP.NET Core Razor Language Services 1.0 Provides languages services for ASP.NET Core Razor.

    ASP.NET Web Frameworks and Tools 2017 5.2.51007.0 For additional information, visit https://www.asp.net/

    Azure App Service Tools v3.0.0 15.0.31106.0 Azure App Service Tools v3.0.0

    Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

    EZ-GIT 1.7.2

    GradleBindings.VisualStudio 1.0 Creates Xamarin Android Binding projects from a gradle file.

    JavaScript Language Service 2.0 JavaScript Language Service

    Merq 1.1.17-rc (cba4571) Command Bus, Event Stream and Async Manager for Visual Studio extensions.

    Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.51120.3

    Microsoft Continuous Delivery Tools for Visual Studio 0.3 Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

    Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

    Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

    Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards

    Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

    Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package

    Mono Debugging for Visual Studio 4.8.4-pre (3fe64e3) Support for debugging Mono processes with Visual Studio.

    NpgsqlVSPackage Extension 1.0 NpgsqlVSPackage Visual Studio Extension Detailed Info

    NuGet Package Manager 4.5.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    Qt Visual Studio Tools 2.1.2 The Qt Visual Studio Tools allow developers to use the standard development environment without having to worry about any Qt-related build steps or tools.

    SQL Server Data Tools 15.1.61710.120 Microsoft SQL Server Data Tools

    Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

    Visual Studio Tools for CMake 1.0 Visual Studio Tools for CMake

    VisualStudio.Mac 1.0 Mac Extension for Visual Studio

    Xamarin 4.8.0.757 (7f9ec2a) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin Designer 4.8.188 (c5813fa34) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

    Xamarin.Android SDK 8.1.3.0 (HEAD/ef47226b7) Xamarin.Android Reference Assemblies and MSBuild support.

    Xamarin.iOS and Xamarin.Mac SDK 11.6.1.2 (6857dfc) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

    opened by ddobrev 60
  • Android App Bundles Crashing on Startup

    Android App Bundles Crashing on Startup

    Steps to Reproduce

    Build a project with the following configuration

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'PROD|AnyCPU' ">
        <DebugType>
        </DebugType>
        <Optimize>true</Optimize>
        <OutputPath>bin\PROD</OutputPath>
        <DefineConstants>PROD</DefineConstants>
        <WarningLevel>4</WarningLevel>
        <AndroidLinkMode>Full</AndroidLinkMode>
        <JavaMaximumHeapSize>
        </JavaMaximumHeapSize>
        <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
        <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
        <AndroidDexTool>d8</AndroidDexTool>
        <BundleAssemblies>false</BundleAssemblies>
    	<AndroidLinkTool>r8</AndroidLinkTool>
        <AndroidAotAdditionalArguments>no-write-symbols,nodebug</AndroidAotAdditionalArguments>
        <AndroidHttpClientHandlerType>System.Net.Http.HttpClientHandler</AndroidHttpClientHandlerType>
        <AotAssemblies>true</AotAssemblies>
        <EnableLLVM>true</EnableLLVM>
        <AndroidUseAapt2>true</AndroidUseAapt2>
        <AndroidPackageFormat>aab</AndroidPackageFormat>
        <AndroidSupportedAbis>arm64-v8a;armeabi-v7a</AndroidSupportedAbis>
        <AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
      </PropertyGroup>
    

    Used MSBuild to build the project as mentioned in #2727

    Opened app in One Plus One, the app crash after Splash screen Opened app in One Plus Six, the app works fine Crashed in Galaxy Prime, Lenovo

    When I tried adding x86 to the SupportedAbis, the behaviour was different, the app was stuck at splash screen.

    Apk Build works fine in every phone.

    Expected Behavior

    Should Open App in every phone without crash

    Actual Behavior

    App crashes during startup in most of the phones.

    Version Information

    Microsoft Visual Studio Community 2019 Preview Version 16.2.0 Preview 3.0 VisualStudio.16.Preview/16.2.0-pre.3.0+29021.104 Microsoft .NET Framework Version 4.7.03056

    Installed Version: Community

    Azure App Service Tools v3.0.0 16.2.226.19058 Azure App Service Tools v3.0.0

    C# Tools 3.2.0-beta3-19312-05+5905d757a89126ebbcdb383b1a10cadda8c6fdc3 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

    Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

    Extensibility Message Bus 1.2.0 (d16-2@8b56e20) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

    IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info

    Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

    Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

    Mono Debugging for Visual Studio 16.2.3 (373927b) Support for debugging Mono processes with Visual Studio.

    NuGet Package Manager 5.2.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

    ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

    ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

    ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info

    Visual Basic Tools 3.2.0-beta3-19312-05+5905d757a89126ebbcdb383b1a10cadda8c6fdc3 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

    Visual F# Tools 10.4 for F# 4.6 16.2.0-beta.19306.3+3de631a4ba0f54953bad33661008d39fb6df7669 Microsoft Visual F# Tools 10.4 for F# 4.6

    Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

    VisualStudio.Mac 1.0 Mac Extension for Visual Studio

    Xamarin 16.2.0.81 (d16-2@df3a2fccb) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin Designer 16.2.0.289 (remotes/origin/d16-2@495a9f28a) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

    Xamarin Templates 16.3.113 (866233a) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

    Xamarin.Android SDK 9.4.0.34 (d16-2/7cce305) Xamarin.Android Reference Assemblies and MSBuild support. Mono: mono/mono/2019-02@c6edaa62f94 Java.Interop: xamarin/java.interop/d16-2@b2b2610 LibZipSharp: grendello/LibZipSharp/d16-2@caa0c74 LibZip: nih-at/libzip/rel-1-5-1@b95cf3f ProGuard: xamarin/proguard/master@905836d SQLite: xamarin/sqlite/3.27.1@8212a2d Xamarin.Android Tools: xamarin/xamarin-android-tools/master@4f717b6

    Xamarin.iOS and Xamarin.Mac SDK 12.14.0.93 (55ad141) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

    Log File

    https://pastebin.com/rSLCvWkN

    I could share the source code / apk / app bundles privately to the Xamarin Android team

    Area: App+Library Build 
    opened by muhaym 59
  • System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted

    System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted

    Steps to Reproduce

    1. Create a Xamarin project for Android
    2. Ask for ReadExternalStorage and WriteExternalStorage permissions
    3. Try simple operation using System.IO.File like Copy or Move

    Sample code

            try
            {
                string logFolder = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, "Download", "logs");
    
                DateTime now = DateTime.Now;
                string timestamp = now.ToString("yyyyMMdd_HHmmss");
                logFolder = Path.Combine(logFolder, timestamp);
               Directory.CreateDirectory(logFolder);
                
                foreach (var logFile in _logFiles)
                {
                    string destFilePath = Path.Combine(logFolder, _systemIo.GetName(logFile));
                    File.Copy((logFile, destFilePath);  //File.Move results in the same error
                }
            }
            catch (Exception ex)  {  }
    

    Expected Behavior

    Step 3 to be executed successfully

    Actual Behavior

    System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted

    Sometimes for the same code, I get System.IO.IOException: Sharing violation on path /data/user/0/com.my.project/files/logs/20190801.log

    Worked without problem with XamarinAndroid SDK 9.1 and VS 2017

    Version Information

    Xamarin.Android SDK version 9.4.0.51 VS 2019 version 16.2.0 Android 6 and 7

    Log File

    System.UnauthorizedAccessException: Access to the path is denied. ---> System.IO.IOException: Operation not permitted at Interop.ThrowExceptionForIoErrno (Interop+ErrorInfo errorInfo, System.String path, System.Boolean isDirectory, System.Func2[T,TResult] errorRewriter) [0x00014] in <ff07eae8184a40a08e79049bbcb31a0e>:0 at Interop.CheckIo (System.Int64 result, System.String path, System.Boolean isDirectory, System.Func2[T,TResult] errorRewriter) [0x0000a] in :0 at Interop.CheckIo (System.Int32 result, System.String path, System.Boolean isDirectory, System.Func`2[T,TResult] errorRewriter) [0x00000] in :0 at System.IO.FileSystem.CopyFile (System.String sourceFullPath, System.String destFullPath, System.Boolean overwrite) [0x00052] in :0 at System.IO.FileSystem.LinkOrCopyFile (System.String sourceFullPath, System.String destFullPath) [0x00065] in :0 at System.IO.FileSystem.MoveFile (System.String sourceFullPath, System.String destFullPath) [0x0003a] in :0 at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00083] in :0

    bug Area: Mono Runtime 
    opened by Golemanova 56
  • Continued Linux support?

    Continued Linux support?

    I noticed the Azure artifacts haven't been updated in almost four months now. Our team relies on this for testing our app and we are wondering what the fate of the project is. We are concerned support will break for v8.3.99.189

    I looked through one of the build logs and the error messages don't seem that horrible. Mostly stuff with nunit? It turns into some failed downloads after what's quoted, maybe because it failed to build?

    @jonpryor @atsushieno I'm hoping someone can look into this or give us clues as to what's missing in the build environment and we can try ourselves. Thanks

    16:15:05 Build FAILED.
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/xa-prep-tasks/xa-prep-tasks.csproj" (default target) (2:2) ->
    16:15:05 (ResolveAssemblyReferences target) -> 
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3277: Found conflicts between different versions of "System.IO.Compression" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/xa-prep-tasks/xa-prep-tasks.csproj]
    16:15:05 
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/android-toolchain/android-toolchain.csproj" (default target) (3:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj" (default target) (7:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj" (default target) (8:2) ->
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.engine". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.engine.api". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit-agent". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit-agent-x86". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05 
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/android-toolchain/android-toolchain.csproj" (default target) (3:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj" (default target) (7:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj" (default target) (8:2) ->
    16:15:05 (CoreCompile target) -> 
    16:15:05   Native.cs(44,18): warning CS0649: Field 'Native.zip_source_args_seek_t.offset' is never assigned to, and will always have its default value 0 [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05   Native.cs(45,15): warning CS0649: Field 'Native.zip_source_args_seek_t.whence' is never assigned to, and will always have its default value 0 [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05 
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/android-toolchain/android-toolchain.csproj" (default target) (3:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj" (default target) (7:2) ->
    16:15:05 (ResolveAssemblyReferences target) -> 
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3277: Found conflicts between different versions of "System.IO.Compression" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj]
    16:15:05 
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/android-toolchain/android-toolchain.csproj" (default target) (3:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj" (default target) (7:2) ->
    16:15:05 (CoreCompile target) -> 
    16:15:05   Xamarin.Android.Tools.BootstrapTasks/RunUITests.cs(18,26): warning CS0114: 'RunUITests.AfterCommand(int, Adb.CommandInfo)' hides inherited member 'Adb.AfterCommand(int, Adb.CommandInfo)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj]
    16:15:05   Xamarin.Android.Tools.BootstrapTasks/RunInstrumentationTests.cs(42,27): warning CS0169: The field 'RunInstrumentationTests.logcatWriter' is never used [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj]
    16:15:05 
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/android-toolchain/android-toolchain.csproj" (default target) (3:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj" (default target) (7:3) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj" (default target) (8:6) ->
    16:15:05 (ResolveAssemblyReferences target) -> 
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.engine". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.engine.api". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit-agent". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit-agent-x86". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/external/LibZipSharp/libZipSharp.csproj]
    16:15:05 
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/android-toolchain/android-toolchain.csproj" (default target) (3:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj" (default target) (7:3) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/xa-prep-tasks/xa-prep-tasks.csproj" (default target) (2:15) ->
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3277: Found conflicts between different versions of "System.IO.Compression" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/xa-prep-tasks/xa-prep-tasks.csproj]
    16:15:05 
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/android-toolchain/android-toolchain.csproj" (default target) (3:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj" (default target) (7:3) ->
    16:15:05   /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2127,5): warning MSB3277: Found conflicts between different versions of "System.IO.Compression" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj]
    16:15:05 
    16:15:05 
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/src/mono-runtimes/mono-runtimes.csproj" (default target) (1) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/android-toolchain/android-toolchain.csproj" (default target) (3:2) ->
    16:15:05 "/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj" (default target) (7:3) ->
    16:15:05 (CoreCompile target) -> 
    16:15:05   Xamarin.Android.Tools.BootstrapTasks/RunUITests.cs(18,26): warning CS0114: 'RunUITests.AfterCommand(int, Adb.CommandInfo)' hides inherited member 'Adb.AfterCommand(int, Adb.CommandInfo)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj]
    16:15:05   Xamarin.Android.Tools.BootstrapTasks/RunInstrumentationTests.cs(42,27): warning CS0169: The field 'RunInstrumentationTests.logcatWriter' is never used [/mnt/jenkins/workspace/xamarin-android-linux/xamarin-android/build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj]
    
    opened by gamesguru 56
  • Deployment issue with Fast Deployment feature enabled after Visual Studio upgrade

    Deployment issue with Fast Deployment feature enabled after Visual Studio upgrade

    After upgrading Visual Studio Professional 2019 to version 16.9.2, when I try to deploy application on Android Emulator or physical device with Fast Deployment feature enabled, I get following error: Error XA0130: Sorry. Fast deployment is only supported on devices running Android 5.0 (API level 21) or higher. Please disable fast deployment in the Visual Studio project property pages or edit the project file in a text editor and set the 'EmbedAssembliesIntoApk' MSBuild property to 'true'.

    Expected Behavior

    App deploy successful

    Actual Behavior

    [XA0130] error, deployment failed

    Version Information

    Microsoft Visual Studio Professional 2019 Version 16.9.2 VisualStudio.16.Release/16.9.2+31112.23 Microsoft .NET Framework Version 4.8.04084

    Installed Version: Professional

    ASP.NET and Web Tools 2019 16.9.688.6828 ASP.NET and Web Tools 2019

    ASP.NET Core Razor Language Services 16.1.0.2112521+5741df381174d72f08e3632bb99f52e8635b6a1a Provides languages services for ASP.NET Core Razor.

    ASP.NET Web Frameworks and Tools 2019 16.9.688.6828 For additional information, visit https://www.asp.net/

    Azure App Service Tools v3.0.0 16.9.688.6828 Azure App Service Tools v3.0.0

    Azure Functions and Web Jobs Tools 16.9.688.6828 Azure Functions and Web Jobs Tools

    C# Tools 3.9.0-6.21160.10+59eedc33d35754759994155ea2f4e1012a9951e3 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

    Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

    Extensibility Message Bus 1.2.6 (master@34d6af2) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

    Fine Code Coverage fcc-f339fe606-9d51-4fca-895c-d50375137b62 Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)

    GhostDoc 20.2.20270.0 Generate XML Comments from your code, maintain clean and up-to-date documentation, produce help documentation in multiple formats, use intelligent source code Spell Checker in Visual Studio.

    IntelliCode Extension 1.0 IntelliCode Visual Studio Extension Detailed Info

    JetBrains ReSharper 2020.3.4 Build 203.0.20210316.132251 JetBrains ReSharper package for Microsoft Visual Studio. For more information about ReSharper, visit http://www.jetbrains.com/resharper. Copyright © 2021 JetBrains, Inc.

    Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.40218.1

    Microsoft Continuous Delivery Tools for Visual Studio 0.4 Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

    Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

    Microsoft Library Manager 2.1.113+g422d40002e.RR Install client-side libraries easily to any web project

    Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

    Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

    Mono Debugging for Visual Studio 16.9.7 (df23ba6) Support for debugging Mono processes with Visual Studio.

    NuGet Package Manager 5.9.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

    ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info

    SQL Server Data Tools 16.0.62103.10080 Microsoft SQL Server Data Tools

    TypeScript Tools 16.0.30201.2001 TypeScript Tools for Microsoft Visual Studio

    Visual Basic Tools 3.9.0-6.21160.10+59eedc33d35754759994155ea2f4e1012a9951e3 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

    Visual F# Tools 16.9.0-beta.21102.9+7ce7132f1459095e635194d09d6f73265352029a Microsoft Visual F# Tools

    Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

    Visual Studio Container Tools Extensions 1.0 View, manage, and diagnose containers within Visual Studio.

    Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers

    VisualStudio.DeviceLog 1.0 Information about my package

    VisualStudio.Foo 1.0 Information about my package

    VisualStudio.Mac 1.0 Mac Extension for Visual Studio

    Xamarin 16.9.000.273 (d16-9@1bba9e0) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin Designer 16.9.0.316 (remotes/origin/d16-9@fdbf64026) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

    Xamarin Templates 16.9.68 (8e9b569) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

    Xamarin.Android SDK 11.2.2.1 (d16-9/877f572) Xamarin.Android Reference Assemblies and MSBuild support. Mono: 5e9cb6d Java.Interop: xamarin/java.interop/d16-9@54f8c24 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.34.1@daff8f4 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-9@d210f11

    Xamarin.iOS and Xamarin.Mac SDK 14.14.2.5 (3836759d4) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

    Log File

    Detailed msbuild log is attached msbuild.zip

    need-info Area: App+Library Build 
    opened by dshourek 55
  • [Xamarin.Android.Build.Tasks] skip MSBuild targets when project file changes

    [Xamarin.Android.Build.Tasks] skip MSBuild targets when project file changes

    Context: https://github.com/dotnet/maui/issues/7808

    There is currently a bug in VS where adding new MAUI pages edits the .csproj file:

    <ItemGroup>
      <MauiXaml Update="NewPage1.xaml">
        <Generator>MSBuild:Compile</Generator>
      </MauiXaml>
    </ItemGroup>
    

    Unfortunately, this triggers many of the Android MSBuild targets to run again -- when they really don't need to.

    Various targets have different forms of:

    Inputs="@(_AndroidMSBuildAllProjects)"
    Inputs="$(MSBuildProjectFullPath)"
    

    Understandably, this reduces the chance of bin/obj bugs such as:

    1. I build my project.

    2. I change some setting my my project file.

    3. I expect the MSBuild targets interested in this setting to rebuild.

    So I don't think we can blindly delete all instances of @(_AndroidMSBuildAllProjects), but try a few at a time. We can replace this value with $(_AndroidBuildPropertiesCache) (which is build.props) making sure important properties are stored in this file.

    Interestingly, even CoreCompile reruns if the project file changes:

    Building target "CoreCompile" completely.
    Input file "UnnamedProject.csproj" is newer than output file "obj\Debug\UnnamedProject.pdb".
    

    Meaning that any of our targets that depend on the current project's build output is going to run anyway. But we can focus on slow parts of the build like javac and d8/r8.

    So far, I updated the following targets:

    • _ConvertResourcesCases
      • Not related to project file at all?
    • _CompileBindingJava and _CompileJava
      • Runs when .java source file change, adjusted some Inputs
    • _GenerateAndroidAssetsDir and _GenerateAndroidResourceDir
      • Not related to project file at all?
    • _BeforeManagedUpdateAndroidResgen
      • Runs when @(AndroidResource) files change
    • _GenerateJavaStubs
      • actually runs when .NET assemblies change anyway
    • _ManifestMerger
      • $(AndroidManifestMerger) added to build.props
    • _GeneratePackageManagerJava
      • $(AndroidEnableMarshalMethods), $(AndroidUseAssemblyStore), and $(AndroidEnableAssemblyCompression) added to build.props.
    • _CompileToDalvik
      • runs when .jar files change
    • _BuildApkEmbed
      • runs when .NET assemblies change
    • _PrepareForSign
      • without Fast Dev, runs when .NET assemblies change
      • runs when .apk/.aab files change

    There are still more MSBuild targets that use @(_AndroidMSBuildAllProjects), but this is a start.

    I added a new test for this scenario.

    opened by jonathanpeppers 0
  • [release/7.0.2xx] Update dependencies from dotnet/installer

    [release/7.0.2xx] Update dependencies from dotnet/installer

    This pull request updates the following dependencies

    Coherency Updates

    The following updates ensure that dependencies with a CoherentParentDependency attribute were produced in a build used as input to the parent dependency's build. See Dependency Description Format

    • Coherency Updates:
      • Microsoft.NET.ILLink.Tasks: from 7.0.100-1.22471.3 to 7.0.100-1.22579.2 (parent: Microsoft.Dotnet.Sdk.Internal)

    From https://github.com/dotnet/installer

    • Subscription: 2a8ff8a0-0650-462c-1d75-08daede53db4
    • Build: 20230104.11
    • Date Produced: January 5, 2023 7:06:36 AM UTC
    • Commit: 202df7bf0a866374e3352091acb3b6fc871c7b3b
    • Branch: refs/heads/release/7.0.2xx
    opened by dotnet-maestro[bot] 2
  • Use .jar files from the .NET runtime pack

    Use .jar files from the .NET runtime pack

    This is WIP

    Once https://github.com/dotnet/runtime/pull/77386 is merged, .NET will require a certain class from libSystem.Security.Cryptography.Native.Android.jar that will be located in the runtime pack files.

    I'm not sure if this is the best way to pull the .jar from the runtimepack so feedback is welcome.

    opened by simonrozsival 0
  • Address breaking changes in Java.Interop

    Address breaking changes in Java.Interop

    Context: https://github.com/xamarin/java.interop/pull/1069

    Any place we had:

    TypeDefinitionCache?
    IMetadataResolver?
    

    These no longer allow nulls, and so overloads that use Obsolete now emit errors instead of warnings:

    [Obsolete ("Use the TypeDefinitionCache overload for better performance.", error: true)]
    public static MethodDefinition GetBaseDefinition (this MethodDefinition method) => throw new NotSupportedException ();
    

    This results in 3 compiler errors in xamarin-android:

    src\Xamarin.Android.Build.Tasks\Mono.Android\ApplicationAttribute.Partial.cs(65,11): error CS0619: 'TypeDefinitionRocks.IsSubclassOf(TypeDefinition, string)' is obsolete: 'Use the TypeDefinitionCache overload for better performance.'
    src\Xamarin.Android.Build.Tasks\Mono.Android\ApplicationAttribute.Partial.cs(268,12): error CS0619: 'JavaNativeTypeManager.ToJniName(TypeDefinition)' is obsolete: 'Use the TypeDefinitionCache overload for better performance.'
    src\Xamarin.Android.Build.Tasks\Utilities\ManifestDocumentElement.cs(28,11): error CS0619: 'JavaNativeTypeManager.ToJniName(TypeDefinition)' is obsolete: 'Use the TypeDefinitionCache overload for better performance.'
    

    After these changes, it appears we will improve the performance further of apps that use:

    • ApplicationAttribute.BackupAgent
    • ApplicationAttribute.Name
    • AndroidManifest.xml attributes that take a System.Type values
    opened by jonathanpeppers 0
  • Debug build JNI crash on bindings of static interface methods

    Debug build JNI crash on bindings of static interface methods

    Android application type

    Android for .NET (net6.0-android, etc.)

    Affected platform version

    VS 2022, net7.0-android

    Description

    App crashes at runtime for debug build with a JNI error related to default/static Java interface method binding. Doesn't matter if the debugger is attached. Might be related to https://github.com/xamarin/xamarin-android/issues/7125 but reverting to the old binding behaviour with <AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods>false</AndroidBoundInterfacesContainStaticAndDefaultInterfaceMethods> didn't help. Same for true value.

    Steps to Reproduce

    Bind any Java library with a default static interface method.

    Did you find any workaround?

    Release build

    Relevant log output

    12-16 22:24:43.893 18210 18210 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    12-16 22:24:43.893 18210 18210 F DEBUG   : Abort message: 'java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: can't call static org.eclipse.tm4e.core.registry.IThemeSource org.eclipse.tm4e.core.registry.IThemeSource$-CC.fromString(org.eclipse.tm4e.core.registry.IThemeSource$ContentType, java.lang.String) with class java.lang.Class<org.eclipse.tm4e.core.registry.IThemeSource>'
    12-16 22:24:43.893 18210 18210 F DEBUG   :     x0  0000000000000000  x1  00000000000046e8  x2  0000000000000006  x3  0000000000000008
    12-16 22:24:43.893 18210 18210 F DEBUG   :     x4  fefeff734dce4667  x5  fefeff734dce4667  x6  fefeff734dce4667  x7  7f7f7f7f7fff7f7f
    12-16 22:24:43.893 18210 18210 F DEBUG   :     x8  0000000000000083  x9  dd61bb06df041932  x10 0000000000000000  x11 fffffffc7ffffbdf
    12-16 22:24:43.893 18210 18210 F DEBUG   :     x12 0000000000000001  x13 ffffffffffffffff  x14 ffffffffff000000  x15 ffffffffffffffff
    12-16 22:24:43.893 18210 18210 F DEBUG   :     x16 00000074528692b0  x17 0000007452788cd0  x18 0000000000000010  x19 00000000000046e8
    12-16 22:24:43.893 18210 18210 F DEBUG   :     x20 00000000000046e8  x21 00000073be9f5b00  x22 000000000000000b  x23 00000073cdd27443
    12-16 22:24:43.893 18210 18210 F DEBUG   :     x24 00000073cdd272f7  x25 0000000000000001  x26 0000007fd92f07e0  x27 0000000000000043
    12-16 22:24:43.893 18210 18210 F DEBUG   :     x28 00000073ce513720  x29 0000007fd92f0690
    12-16 22:24:43.893 18210 18210 F DEBUG   :     sp  0000007fd92f0650  lr  000000745277c144  pc  000000745277c16c
    12-16 22:24:43.923 18210 18210 F DEBUG   : 
    12-16 22:24:43.923 18210 18210 F DEBUG   : backtrace:
    12-16 22:24:43.923 18210 18210 F DEBUG   :     #00 pc 000000000002216c  /system/lib64/libc.so (abort+116)
    12-16 22:24:43.923 18210 18210 F DEBUG   :     #01 pc 0000000000465684  /system/lib64/libart.so (art::Runtime::Abort(char const*)+1196)
    12-16 22:24:43.923 18210 18210 F DEBUG   :     #02 pc 0000000000008ce0  /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+724)
    12-16 22:24:43.923 18210 18210 F DEBUG   :     #03 pc 00000000002e5ec8  /system/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1640)
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #04 pc 00000000002e6038  /system/lib64/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+116)
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #05 pc 00000000000fdabc  /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const*, ...)+148)
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #06 pc 00000000001017d0  /system/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::CheckMethodAndSig(art::ScopedObjectAccess&, _jobject*, _jclass*, _jmethodID*, art::Primitive::Type, art::InvokeType)+1160)
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #07 pc 0000000000101e40  /system/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodA(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, jvalue*, art::Primitive::Type, art::InvokeType)+748)
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #08 pc 000000000004d680  /data/app/com.companyname.AndroidBindingsJNICrashes-OMT4AzuyDOaf_ESYip9Szg==/lib/arm64/libmonodroid.so (java_interop_jnienv_call_static_object_method_a+48)
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #09 pc 00000000002af4c4  /data/app/com.companyname.AndroidBindingsJNICrashes-OMT4AzuyDOaf_ESYip9Szg==/lib/arm64/libmonosgen-2.0.so
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #10 pc 00000000002ae210  /data/app/com.companyname.AndroidBindingsJNICrashes-OMT4AzuyDOaf_ESYip9Szg==/lib/arm64/libmonosgen-2.0.so
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #11 pc 00000000002a48a0  /data/app/com.companyname.AndroidBindingsJNICrashes-OMT4AzuyDOaf_ESYip9Szg==/lib/arm64/libmonosgen-2.0.so
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #12 pc 00000000002afdf4  /data/app/com.companyname.AndroidBindingsJNICrashes-OMT4AzuyDOaf_ESYip9Szg==/lib/arm64/libmonosgen-2.0.so
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #13 pc 00000000002b035c  /data/app/com.companyname.AndroidBindingsJNICrashes-OMT4AzuyDOaf_ESYip9Szg==/lib/arm64/libmonosgen-2.0.so
    12-16 22:24:43.924 18210 18210 F DEBUG   :     #14 pc 000000000000b7f0  <anonymous:000000744e8c1000>
    12-16 22:24:44.237  1077  1077 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_07
    
    Area: Bindings 
    opened by radimitrov 0
Releases(33.0.4)
  • 33.0.4(Nov 9, 2022)

    What's Changed

    • [ci] Add EXE files to windows-toolchain-pdb artifact by @pjcollins in https://github.com/xamarin/xamarin-android/pull/7279
    • $(AndroidPackVersionSuffix)=rc.2; net7 is 33.0.0.rc.2 by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7283
    • [marshal methods] Part 3 of ? by @grendello in https://github.com/xamarin/xamarin-android/pull/7163
    • [Mono.Android] add "built-in" delegate for MAUI+non-Shell by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7267
    • Bump LZ4 to v1.9.4 by @grendello in https://github.com/xamarin/xamarin-android/pull/7262
    • [AOT] Pass the hybrid option to AOT compiler, if enabled by @grendello in https://github.com/xamarin/xamarin-android/pull/7263
    • Bump r8 from 3.3.28 to 3.3.75 in /src/r8 by @dependabot in https://github.com/xamarin/xamarin-android/pull/7292
    • [xaprepare] Generate SourceLink.json by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7298
    • Bump to xamarin/java.interop@e31d9c62 by @jpobst in https://github.com/xamarin/xamarin-android/pull/7266
    • [tests] disable $(_FastDeploymentDiagnosticLogging) in PerformanceTest by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7307
    • Bump XAT for new LibZipSharp by @grendello in https://github.com/xamarin/xamarin-android/pull/7309
    • Bump to xamarin/java.interop/main@4f813cb2 by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7308
    • [tests] Use $(AndroidSdkPlatformToolsVersion)=33.0.3 by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7320
    • [ci] Skip classic tests on .NET release branches by @pjcollins in https://github.com/xamarin/xamarin-android/pull/7312
    • [ci] Add support to net7.0 for multi-targeting in VS by @pjcollins in https://github.com/xamarin/xamarin-android/pull/7311
    • [ci] Split up signing for files to be notarized by @pjcollins in https://github.com/xamarin/xamarin-android/pull/7321
    • [Mono.Android] Improve the GetHttpMessageHandler function by @simonrozsival in https://github.com/xamarin/xamarin-android/pull/7214
    • [FabricBot] Apply 'needs-triage' label to new issues. by @jpobst in https://github.com/xamarin/xamarin-android/pull/7327
    • [One .NET] fix dotnet run -c Release by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7341
    • Don't use Dictionary<K,V> to avoid duplicate value exception by @grendello in https://github.com/xamarin/xamarin-android/pull/7340
    • [FabricBot] Add 'possibly-stale' GH label for closing old issues. by @jpobst in https://github.com/xamarin/xamarin-android/pull/7343
    • [xaprepare] CGManifest.json conforms to JSON schema by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7342
    • Bump SQLite to v3.39.3 by @grendello in https://github.com/xamarin/xamarin-android/pull/7337
    • Marshal methods part 4 of 5 (runtime) by @grendello in https://github.com/xamarin/xamarin-android/pull/7285
    • Bump NDK to r25b by @grendello in https://github.com/xamarin/xamarin-android/pull/7305
    • Update the VSCode Task to use net7.0-android by @dellis1972 in https://github.com/xamarin/xamarin-android/pull/7268
    • [tests] update times in MSBuildDeviceIntegration.csv by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7347
    • [Mono.Android] Improve server certificate custom validation callback integration to cover hostname mismatch by @simonrozsival in https://github.com/xamarin/xamarin-android/pull/7246
    • [One .NET] add XA1029 for $(AotAssemblies) by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7344
    • [Xamarin.Android.Build.Tasks] Use binutils for Aot and LLVM by @pjcollins in https://github.com/xamarin/xamarin-android/pull/6901
    • Bump to dotnet/installer/main@dd355bb 7.0.100-rc.2.22457.6 by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7360
    • Localized file check-in by OneLocBuild Task: Build definition ID 11410: Build ID 6664168 by @vs-mobiletools-engineering-service2 in https://github.com/xamarin/xamarin-android/pull/7364
    • [dependabot] Automatically update a few submodules by @pjcollins in https://github.com/xamarin/xamarin-android/pull/7361
    • [templates] add ide.host.json files by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7349
    • [tests] export $DOTNET_gcServer as 0 by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7363
    • [templates] fix broken/wrong item template contents by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7366
    • AndroidLinkResources and Styleables by @dellis1972 in https://github.com/xamarin/xamarin-android/pull/7306
    • [linker] preserve interfaces on Java types by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7204
    • [Xamarin.Android.Build.Tasks] Feature for excluding Kotlin-related files from apps by @dellis1972 in https://github.com/xamarin/xamarin-android/pull/7356
    • Bump monodroid to bring in Kotlin filter changes by @dellis1972 in https://github.com/xamarin/xamarin-android/pull/7370
    • [ci] Fix test categories for emu smoke tests by @pjcollins in https://github.com/xamarin/xamarin-android/pull/7374
    • Bump to mono/mono/2020-02@a96bde97 by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7372
    • Bump to Tessil/robin-map/master@784245b4 [v1.0.1] by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7382
    • Bump to xamarin/xamarin-android-tools/main@0be567a9 by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7383
    • Bump to xamarin/monodroid/main@135be73 by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7384
    • LEGO: Pull request from juno/hb_6dddf33b-c6da-43d8-ac04-14d2c339cb00_20220916093342545 to main by @csigs in https://github.com/xamarin/xamarin-android/pull/7385
    • Bump to xamarin/Java.Interop/main@fcc33ce2 by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7380
    • Parse cookies on redirect (legacy AndroidClientHandler) by @dominik-weber in https://github.com/xamarin/xamarin-android/pull/7373
    • [docs] Document how to debug JNI Object Reference crashes by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7362
    • Bump to xamarin/monodroid/main@8f925e33 by @jonpryor in https://github.com/xamarin/xamarin-android/pull/7387
    • $(AndroidPackVersionSuffix)=rtm; net7 is 33.0.0.rtm by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7393
    • Use LLVM toolchain compressed with UPX by @grendello in https://github.com/xamarin/xamarin-android/pull/7412
    • Update .NET 7 AOT profiles by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7452
    • [release/7.0.1xx] stable 33.0.x branding by @jonathanpeppers in https://github.com/xamarin/xamarin-android/pull/7453

    Full Changelog: https://github.com/xamarin/xamarin-android/compare/33.0.0-rc.1.151...33.0.4

    Source code(tar.gz)
    Source code(zip)
  • 33.0.0-rc.1.151(Nov 9, 2022)

    Android 13 (API-33) Bindings

    Android 13 adds a number of new APIs in API-33, which are now available when by setting $(TargetFramework)=net7.0-android33.0.

    App build system changes

    Runtime Optimizations

    • Enable lazy loading of AOT'd assemblies
      (Issue #6935, PR #6940, Commit 6dc426f1)

      Lazily load AOT'd assemblies and their associated .so native libraries. This can improve app startup times, and is enabled by default.

      This can be disabled by setting the $(AndroidAotEnableLazyLoad) MSBuild property to False.

    • Bump to lz4/lz4/v1.9.4@5ff83968 [v1.9.4]
      (PR #7262, Commit 0a9d7451)

      lz4 is used as part of assembly compression. This bump includes faster decompression speed (~20%) on aarch64 platforms.

    • Speed up java-to-managed typemap lookups
      (PR #6905, Commit f48b97cb)

    • Call JNIEnv.Initialize() directly, via function pointer
      (PR #6880, Commit 16680700)

      Helps improve app startup.

    Debugger

    Mono.Android

    • Fix custom validation callback for server certificates in HTTP handlers
      (PR #6665, Commit 48540d69)

      Fix the AndroidMessageHandler.ServerCertificateCustomValidationCallback property so that it is actually used and usable on .NET 7.

    • Optional NTLMv2 support in AndroidMessageHandler
      (PR #6999, Commit f348163b)

      Add support for a new $(AndroidUseNegotiateAuthentication) MSBuild property. When True, the Xamarin.Android.Net.AndroidMessageHandler type will support NTLMv2 authentication. This authentication method is recommended only for legacy services that do not provide any more secure options.

      If an endpoint requires NTLMv2 authentication and NTMLv2 is not enabled, then the endpoint will return HTTP-401 errors.

    Templates

    Source code(tar.gz)
    Source code(zip)
  • v11.2.99.192(Apr 21, 2021)

    Application build and deployment

    • Developer Community 1288717: Support Fast Deployment for System Applications. Added support for fast deployment while building system based applications. Applications developed in this mode need to be signed with a platform key and set /manifest/@android:sharedUserId to android.uid.system within AndroidManifest.xml:

              <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                  android:sharedUserId="android.uid.system"
                  …>
              </manifest>
      
    • Developer Community 1363149: System.ArgumentException when %PATH% or %PATHEXT% contain ".

    • GitHub PR 5304: Add support for producing a ProGuard mapping.txt file to the build system. This file can be used by users to remove this warning:

      "This App Bundle contains Java/Kotlin code, which might be obfuscated."
      

      ... when uploading packages to the Google Play Store.

      In order to opt-in to this behavior, set the AndroidProguardMappingFile MSBuild property in your project file to the path of the file you want generated:

      <PropertyGroup>
        <AndroidProguardMappingFile>$(OutputPath)\mapping.txt</AndroidProguardMappingFile>
      </PropertyGroup>
      
    • GitHub PR 5327: Allow users to specify additional app bundle "modules" when building using $(AndroidPackageFormat) set to aab.

    • GitHub Issue 5562: Fix NullReferenceException from <LinkAssembliesNoShrink/> task.

    • GitHub Issue 5627: Allow multiple r-classes.jar files to be included in a build.

    • GitHub Issue 5633: Support $(AndroidUseInterpreter) under .NET 6.

    • GitHub Issue 5710: Command too long error when deploying an app with lots of localization assemblies.

    • GitHub Issue 5723: BuildVersionCodes.R had the wrong value.

    • GitHub Issue 5751: On .NET 6, the default value for $(SuppressTrimAnalysisWarnings) is True.

    • GitHub PR 5726: An external contribution by @mfranke-moba, which adds support for out and inout array parameters in AIDL files. Fixes GitHub Issue 4717 and GitHub Issue 5079.

    Preview bindings for Android 12 Developer Preview 2

    This version includes preview bindings for the second Developer Preview of Android 12 from Google. See the Android 12 Developer Preview documentation for additional information about the behavior and API changes in this new Android version. To try the bindings for the new APIs in a Xamarin.Android project, set the $(TargetFrameworkVersion) to v11.0.99 in the .csproj file:

    <TargetFrameworkVersion>v11.0.99</TargetFrameworkVersion>
    

    Binding project build

    Notable issues fixed

    Source code(tar.gz)
    Source code(zip)
  • v11.2.2.1(Apr 21, 2021)

    Installing

    What's new in Xamarin.Android 11.2

    Xamarin.Android 11.2 releases

    Corresponding Visual Studio 2019 Preview release notes

    March 2, 2021 — Xamarin.Android 11.2.0.21

    This version is included in Visual Studio 2019 version 16.9 and Visual Studio 2019 for Mac version 8.9.

    In Xamarin.Android 11.2.0.21

    Rewritten fast deployment system

    The Fast Deployment system has been fully rewritten to improve reliability and performance.

    The new system also no longer uses the external drive for the fast deployment files. All of the files and tooling are now stored in the application's internal directory. This has an advantage in that when the application is uninstalled, all of the files and the tooling will be removed as well.

    The new system will not work on any devices older than Android 5.0 Lollipop (API level 21), as it relies on features that only work Android 5.0 and later.

    To debug an app running Android older than Android 5.0, disable Fast Deployment by setting the $(EmbedAssembliesIntoApk) property to False.

    See the Fast Deployment documentation for more details.

    Known Issue: Fast Deployment and .mdb files

    The new Fast Deployment mechanism may fail with:

    error : Could not find file "…/<somefile>dll.mdb"
    

    See also: https://github.com/xamarin/xamarin-android/issues/5631

    The issue here is that we are trying to fast deploy a file that does not exist. This is normally only caused when referencing an old NuGet package or Project which is still using the old Pdb format for debug symbols. This old format has to be converted into the Mdb format in order for those debug symbols to be used by the runtime. The new Portable Pdb format is fully supported.

    The work around is to upgrade the nuget package to a newer version which is hopefully now using the Portable format. If it is for a Project reference you manage, then try changing the DebugType to be portable.

    If none of that is an option, you can try adding the following to your application csproj.

    <Target Name="_RemoveMdbFiles" BeforeTargets="_Upload">
        <ItemGroup>
            <_ResolvedSymbols Remove="**/*.dll.mdb" />
        </ItemGroup>
    </Target>
    

    Application and library build and deployment

    • Developer Community 1036602, GitHub Issue 5009: Starting in Xamarin.Android 10.2, .pdb files were not included in the APK if the managed linker was enabled.

    • Developer Community 1184573: Xamarin Android falsely saying that Resource does not exist in the current context (CS0103). Duplicate attr elements in declare-styleable styles were causing the design-time build system to crash. As a result the Resource.designer.cs was not being updated.

    • GitHub 2745: The @(JavaDocJar) build action would either cause an MSB3375 error, or wasn't used at all.

    • GitHub PR 4614: Syntax errors in AndroidManifest.xml always referred to the generated version of the file (like obj\Debug\90\android\manifest\AndroidManifest.xml), even when the syntax error was also present in the hand-written input Properties\AndroidManifest.xml file. Manifest errors are now fixed up to point to the Properties\AndroidManifest.xml file. An additional note will be added to the message to inform the user that the issue might not be in that file, but might be caused by code.

    • GitHub PR 4783: error XA1011: Using ProGuard with the D8 DEX compiler is no longer supported... AndroidLinkTool ... could appear without clues about the responsible MSBuild property in certain cases where AndroidLinkTool was empty. Xamarin.Android now provides additional XA1027 and XA1028 build warnings to indicate cases where one of the older EnableProguard or AndroidEnableProguard MSBuild properties is involved.

    • GitHub PR 4846: Starting in [Android 11][0], for Fast Deployment to work on an API 30 device or emulator, the following <queries/> entries must be present in AndroidManifest.xml:

      <?xml version="1.0" encoding="utf-8"?>
      <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0"   package="com.xamarin.android.helloworld">
        <uses-sdk android:targetSdkVersion="30" />
        <!-- ... -->
        <queries>
          <package android:name="Mono.Android.DebugRuntime" />
          <package android:name="Mono.Android.Platform.ApiLevel_30" />
        </queries>
      </manifest>
      

      These will be generated if $(AndroidUseSharedRuntime) is true and android:targetSdkVersion is 30 or higher.

    • GitHub PR 4966: An XA1025 error will now be emitted when $(AndroidAotMode) is Hybrid and one of the targeted ABIs is armeabi-v7a:

      error XA1025: The experimental 'Hybrid' value for the 'AndroidAotMode' MSBuild
      property is not currently compatible with the armeabi-v7a target ABI. To
      continue using the experimental 'Hybrid' value for 'AndroidAotMode', deselect
      the armeabi-v7a target ABI in the Visual Studio project property pages or edit
      the project file in a text editor and remove 'armeabi-v7a' from the
      'AndroidSupportedAbis' MSBuild property.
      

      Projects using the experimental Hybrid value for the AndroidAotMode MSBuild property that also include the value armeabi-v7a in the AndroidSupportedAbis MSBuild property will now see this build error to help indicate that applications built with these settings would abort during startup on armeabi-v7a ABI device environments (GitHub Issue 1218).

      If armeabi-v7a device compatibility is required for the app, the AndroidAotMode MSBuild property should be set to Normal or removed from the project file completely. To adjust the value of the AndroidAotMode MSBuild property, edit the project file in a text editor.

      If armeabi-v7a device compatibility is not required for the app, then deselect the armeabi-v7a target ABI in the Visual Studio project property pages to resolve the build error.

      In Visual Studio, the target ABIs can be adjusted under Supported architectures in the Advanced section of the Android Options tab of the project property pages

      In Visual Studio for Mac, the target ABIs can be adjusted under Supported ABIs in the Advanced tab of the Android Build section of the project property pages.

      Alternatively, edit the project file in a text editor and remove armeabi-v7a from the AndroidSupportedAbis MSBuild property by hand.

    • GitHub PR 5188: Improve performance by lazily loading an Android resource mapping file that is only used for error messages. This reduced the overall build time by 348 milliseconds in a real-world project in an initial clean build or incremental builds with Android resource changes.

    • GitHub Issue 4996: application deploy on Android 11 emulator fails with Mono.AndroidTools.AdbException: secure_mkdirs failed: Permission denied

    • GitHub Issue 4977: Update warning XA0113 to mention that Google Play now requires API-29, not API-28.

    • Github PR 5107: Starting in Xamarin.Android 11.0, building solutions in parallel with msbuild YourSolution.sln -m could fail with errors such as:

      obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource mipmap/ic_launcher (aka com.companyname.skiasharpsample:mipmap/ic_launcher) not found.
      obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource string/app_name (aka com.companyname.skiasharpsample:string/app_name) not found.
      obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource mipmap/ic_launcher_round (aka com.companyname.skiasharpsample:mipmap/ic_launcher_round) not found.
      obj\Release\100\android\manifest\AndroidManifest.xml(9,0): error APT2260: resource style/MainTheme.Splash (aka com.companyname.skiasharpsample:style/MainTheme.Splash) not found.
      Xamarin.Android.Aapt2.targets(226,3): error APT2067: failed processing manifest.
      
    • GitHub Issue 5218: System.IO.DirectoryNotFoundException could occur when building a project on a Windows network share.

    • GitHub Issue 5234: error XA0032: Java SDK 11.0 or above is required when using Android SDK Build-Tools 30.x.x. appeared unnecessarily when building on a system with Android SDK Build-Tools version 30 or higher installed.

    • GitHub PR 5266: Minor improvements to the way zip archives are created. Do not create folders in the classes.zip file and allow the auto flushing of a zip file to be switched off.

    • GitHub PR 5283: Fixed an issue where changing the selected device or emulator in the IDE would cause many parts of the build to run on an incremental build. This reduced the overall build time from 5.526 seconds to 1.451 seconds for this scenario in a small test project.

    • GitHub PR 5278: Update the linker in Release builds to insert GC.KeepAlive() invocations within JNI marshal methods to prevent premature instance collection. See also.

    • GitHub PR 5304: Add support for producing a proguard mapping.txt file to the build system. This file can be used by users to remove this warning "This App Bundle contains Java/Kotlin code, which might be obfuscated." when uploading packages to the Google Play Store. In order to opt-in to this behavior, set the $(AndroidProguardMappingFile) property in your project file to the path of the file you want generated:

      <PropertyGroup>
        <AndroidProguardMappingFile>$(OutputPath)\mapping.txt</AndroidProguardMappingFile>
      </PropertyGroup>
      
    • GitHub PR 5311: Add support for deploying and debugging against different user accounts on Android Devices. In order to use this you need to specify the AndroidDeviceUserId in either your csproj or on the command line.

       <PropertyGroup>
         <AndroidDeviceUserId>10</AndroidDeviceUserId>
       </PropertyGroup>
      
      msbuild foo.csproj /t:Install /p:AndroidDeviceUserId=10
      

      The value is the uid value you get from the following adb command

      adb shell pm list users
      

      This will return the following data

      Users:
        UserInfo{0:Owner:c13} running
        UserInfo{10:Guest:404}
      

      The uid is the first integer value. In the example they are 0 and 10.

    • GitHub PR 5351: The XA0113 warning has been updated to reflect a more recent minimum target version of Android 10 (API level 29) for submissions to the Google Play store. The following warning will now appear for projects that have an earlier version set under Compile using Android version: (Target Framework) in the Visual Studio project property pages:

      warning XA0113: Google Play requires that new applications and updates must use a TargetFrameworkVersion of v10.0 (API level  29) or above. You are currently targeting v9.0 (API level 28).
      
    • GitHub Issue 5357: Add support for the @(AndroidLibrary) build action.

    • GitHub PR 5375: Removed decoration of System.ComponentModel.CategoryAttribute to improve linker behavior. This reduced the .NET assembly size of a .NET 6 application by 3,271 bytes.

      CategoryAttribute was removed from properties on types such as Android.App.ActivityAttribute:

      -[Category ("@drawable;@mipmap")]
      public string? Icon { get; set; }
      -[Category ("@string")]
      public string? Label { get; set; }
      

      A full list of types changed:

      • Android.App.ActivityAttribute
      • Android.App.ApplicationAttribute
      • Android.App.InstrumentationAttribute
      • Android.App.ServiceAttribute
      • Android.Content.BroadcastReceiverAttribute
      • Android.Content.ContentProviderAttribute
    • GitHub PR 5410: Bump The version of the D8 dexer and R8 shrinker to 2.1.75.

    • GitHub PR 5411: The version of the bundletool executable included in Xamarin.Android has been updated from 1.2.0 to 1.4.0, bringing in several improvements and bug fixes.

    • GitHub PR 5477: error MSB3375: The file __AndroidLibraryProjects__.zip does not exist. could occur when building certain Xamarin.Android class library projects.

    Binding fixes in Mono.Android.dll

    Binding project build

    • GitHub PR 698: [generator] Emit [EditorBrowsable(false)] and [DebuggerBrowsable(false)] for JLO machinery.

    • GitHub PR 701: [generator] Add 'managedOverride' metadata to allow user to force 'override'/'virtual'.

    • GitHub PR 715: [generator] Provide line/col numbers for api.xml warnings.

    • GitHub PR 726: [generator] Prevent generating duplicate EventArgs classes.

    • GitHub PR 729: [generator] Fix invalid parsing of complex generic types.

    • GitHub PR 745: [jcw-gen] Do not register static methods on an interface.

    • GitHub PR 756: [ApiXmlAdjuster] Use different data model structures for better performance

    • GitHub PR 759: [class-parse] Support AndroidX's NonNull annotation.

    • GitHub PR 765: [generator] Fix MSBuild warning/error format for VS.

    • GitHub PR 768: [Java.Interop] Prevent premature collection w/ JniInstance*

    • GitHub PR 770: [generator] Ensure DIM from Cecil imported references get correctly marked.

    • GitHub PR 5431: [Xamarin.Android.Build.Tasks] Enable NRT for bindings projects.

      Adding <Nullable>enable</Nullable> to an Android Bindings project that has <LangVersion> of at least C# 8 will cause the generated code to include nullable reference types. Many Nullable annotations from the Java/Android ecosystem are supported. (Supported List)

    Better file association for Android manifest syntax errors

    Syntax errors in AndroidManifest.xml previously always referred to the generated version of the file (like obj\Debug\90\android\manifest\AndroidManifest.xml), even for syntax errors that were also present in the manually configured input Properties\AndroidManifest.xml file. Android manifest errors are now fixed up to point to the Properties\AndroidManifest.xml file. The errors also now include a note to inform users that manifest generation attributes in source code files can be responsible for the errors in some cases.

    Deprecation of AAPT in favor of AAPT2

    warning XA1026: Using AAPT is deprecated in favor of AAPT2. Please enable 'Use incremental Android packaging system (aapt2)' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidUseAapt2' MSBuild property to 'true'.
    

    Google has deprecated the AAPT command-line tool in favor of AAPT2 going forward. Xamarin.Android has accordingly now deprecated <AndroidUseAapt2>false</AndroidUseAapt2> as well.

    Update the AndroidUseAapt2 MSBuild property to true to select AAPT2. This property corresponds to the Use incremental Android packaging system (aapt2) setting in the Visual Studio project properties pages. Alternatively, remove <AndroidUseAapt2> from the .csproj file to let the build select the default value true.

    [!IMPORTANT] AAPT2 will in some cases enforce stricter rules on resource files than the previous AAPT, so some adjustments might be needed if you see new error messages that come from AAPT2 itself rather than from the Xamarin.Android build tasks.

    If needed, the --legacy switch can run AAPT2 in an AAPT compatibility mode. Add the following to your .csproj file:

    <PropertyGroup>
      <AndroidAapt2CompileExtraArgs>--legacy</AndroidAapt2CompileExtraArgs>
    </PropertyGroup>
    

    Deprecation of DebugType full and pdbonly

    Support for .mdb or .pdb symbols files that were built with the DebugType MSBuild property set to full or pdbonly is now deprecated. This applies to .mdb and .pdb files in application projects as well as in referenced libraries, including NuGet packages.

    warning XA0125: 'AndroidApp1.pdb' is using a deprecated debug
    information level. Set the debugging information to Portable in the
    Visual Studio project property pages or edit the project file in a
    text editor and set the 'DebugType' MSBuild property to 'portable' to
    use the newer, cross-platform debug information level. If this file
    comes from a NuGet package, update to a newer version of the NuGet
    package or notify the library author.
    

    Set DebugType to portable in the application project as well all library references. portable is the recommended setting for all projects from now on. The older full and pdbonly settings are for older Windows-specific file formats. .NET 6 and higher will not support those older formats.

    In Visual Studio, go to Properties > Build > Advanced in the project property pages and change Debugging information to Portable.

    In Visual Studio for Mac, go to Build > Compiler > Debug information in the project property pages and change Debug information to Portable.

    If the problematic symbol file comes from a NuGet package, update to a newer version of the package or notify the library author.

    Deprecation of JavaDocJar Build action

    The @(JavaDocJar) Build action build action is deprecated, and will not be supported in .NET 6. Please use the @(JavaSourceJar) Build action.

    Removal of ${library.imports:} support in AndroidResgenExtraArgs MSBuild property

    A text templating feature for AAPT and AAPT2 has been removed that provided a workaround for the Amazon Fire Phone:

    <AndroidResgenExtraArgs>-I ${library.imports:eac-api.jar} -I ${library.imports:euclid-api.jar}</AndroidResgenExtraArgs>
    

    The ${library.imports:...} syntax should no longer be needed by modern Android libraries. .aar files are the recommended way for Java/Kotlin libraries to distribute Android resources to be consumed by Xamarin.Android application projects.

    Note that the AndroidResgenExtraArgs and AndroidAapt2LinkExtraArgs MSBuild properties will continue to pass additional arguments to aapt and aapt2 link with the ${library.imports:...} syntax removed.

    UseShortFileNames=false is no longer supported

    In previous versions of Xamarin.Android, you could set the UseShortFileNames MSbuild property in your .csproj file:

    <PropertyGroup>
      <UseShortFileNames>false</UseShortFileNames>
    </PropertyGroup>
    

    This would tell Xamarin.Android's MSBuild targets to use the "long" folder names such as:

    • obj\Debug\lp -> __library_projects__
    • obj\Debug\lp*\jl -> library_project_imports
    • obj\Debug\lp*\nl -> native_library_imports

    This was useful when UseShortFileNames was a new feature, giving developers a way to "opt out" if they hit a bug. However, UseShortFileNames has defaulted to true since around July 2017 to help with the Windows API maximum path length limitation.

    This functionality has been removed from Xamarin.Android. Short file names will be used going forward.

    All enhancements and issues fixed in Xamarin.Android 11.2

    GitHub enhancements

    GitHub bugs

    Developer Community

    Other changes in Xamarin.Android 11.2

    Other changes

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Source code(tar.gz)
    Source code(zip)
  • v11.1.99.168(Nov 10, 2020)

    What's new in Xamarin.Android 11.2

    November 10, 2020 — Xamarin.Android 11.1.99.168 was published as part of Visual Studio 2019 version 16.9 Preview 1 and Visual Studio 2019 for Mac version 8.9 Preview 1.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Deprecations, removals, and default configuration changes

    Build and deployment performance

    GitHub PR 5188: Improve performance by lazily loading an Android resource mapping file that is only used for error messages. This reduced the overall build time by 348 milliseconds in a real-world project in an initial clean build or incremental builds with Android resource changes.

    Rewritten fast deployment system

    As part of this update, the fast deployment system used for Debugging apps has been changed. The shared runtime and shared platform packages are no longer used or required.

    The new system also no longer uses the external drive for the fast deployment files. All of the files and tooling are now stored in the application's internal directory. This has an advantage in that when the application is uninstalled, all of the files and the tooling will be removed as well.

    The new system will not work on any devices older than Android 5.0 Lollipop (API level 21). This is because it relies on features that only work from API level 21 onwards. Also API level 21 is the lowest supported platform for the runtime, so running and debugging on older devices will be impossible.

    See Documentation for more details.

    Deprecation of DebugType full and pdbonly

    warning XA0125: 'AndroidApp1.pdb' is using a deprecated debug
    information level. Set the debugging information to Portable in the
    Visual Studio project property pages or edit the project file in a
    text editor and set the 'DebugType' MSBuild property to 'portable' to
    use the newer, cross-platform debug information level. If this file
    comes from a NuGet package, update to a newer version of the NuGet
    package or notify the library author.
    

    Support for .mdb or .pdb symbols files that were built with the DebugType MSBuild property set to full or pdbonly is now deprecated. This applies to .mdb and .pdb files in application projects as well as in referenced libraries, including NuGet packages.

    Set DebugType to portable in the application project as well all library references. portable is the recommended setting for all projects from now on. The older full and pdbonly settings are for older Windows-specific file formats. .NET 6 and higher will not support those older formats.

    In Visual Studio, go to Properties > Build > Advanced in the project property pages and change Debugging information to Portable.

    In Visual Studio for Mac, go to Build > Compiler > Debug information in the project property pages and change Debug information to Portable.

    If the problematic symbol file comes from a NuGet package, update to a newer version of the package or notify the library author.

    Deprecation of AAPT in favor of AAPT2

    warning XA1026: Using AAPT is deprecated in favor of AAPT2. Please enable 'Use incremental Android packaging system (aapt2)' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidUseAapt2' MSBuild property to 'true'.
    

    Google has deprecated the AAPT command-line tool in favor of AAPT2 going forward. Xamarin.Android has accordingly now deprecated <AndroidUseAapt2>false</AndroidUseAapt2> as well.

    Update the AndroidUseAapt2 MSBuild property to true to select AAPT2. This property corresponds to the Use incremental Android packaging system (aapt2) setting in the Visual Studio project properties pages. Alternatively, remove <AndroidUseAapt2> from the .csproj file to let the build select the default value true.

    Important: AAPT2 will in some cases enforce stricter rules on resource files than the previous AAPT, so some adjustments might be needed if you see new error messages that come from AAPT2 itself rather than from the Xamarin.Android build tasks.

    If needed, the --legacy switch can run AAPT2 in an AAPT compatibility mode. Add the following to your .csproj file:

    <PropertyGroup>
      <AndroidAapt2CompileExtraArgs>--legacy</AndroidAapt2CompileExtraArgs>
    </PropertyGroup>
    

    Better file association for Android manifest syntax errors

    Syntax errors in AndroidManifest.xml previously always referred to the generated version of the file (like obj\Debug\90\android\manifest\AndroidManifest.xml), even for syntax errors that were also present in the manually configured input Properties\AndroidManifest.xml file. Android manifest errors are now fixed up to point to the Properties\AndroidManifest.xml file. The errors also now include a note to inform users that manifest generation attributes in source code files can be responsible for the errors in some cases.

    Removal of ${library.imports:} support in AndroidResgenExtraArgs MSBuild property

    A text templating feature for AAPT and AAPT2 has been removed that provided a workaround for the Amazon Fire Phone:

    <AndroidResgenExtraArgs>-I ${library.imports:eac-api.jar} -I ${library.imports:euclid-api.jar}</AndroidResgenExtraArgs>
    

    The ${library.imports:...} syntax should no longer be needed by modern Android libraries. .aar files are the recommended way for Java/Kotlin libraries to distribute Android resources to be consumed by Xamarin.Android application projects.

    Note that the AndroidResgenExtraArgs and AndroidAapt2LinkExtraArgs MSBuild properties will continue to pass additional arguments to aapt and aapt2 link with the ${library.imports:...} syntax removed.

    UseShortFileNames=false is no longer supported

    In previous versions of Xamarin.Android, you could set the UseShortFileNames MSbuild property in your .csproj file:

    <PropertyGroup>
      <UseShortFileNames>false</UseShortFileNames>
    </PropertyGroup>
    

    This would tell Xamarin.Android's MSBuild targets to use the "long" folder names such as:

    • obj\Debug\lp -> __library_projects__
    • obj\Debug\lp*\jl -> library_project_imports
    • obj\Debug\lp*\nl -> native_library_imports

    This was useful when UseShortFileNames was a new feature, giving developers a way to "opt out" if they hit a bug. However, UseShortFileNames has defaulted to true since around July 2017 to help with the Windows API maximum path length limitation.

    This functionality has been removed from Xamarin.Android. Short file names will be used going forward.

    Notable issues fixed

    Application and library build and deployment

    • Developer Community 1184573: Xamarin Android falsely saying that Resource does not exist in the current context (CS0103). Duplicate attr elements in declare-styleable styles were causing the design-time build system to crash. As a result the Resource.designer.cs was not being updated.

    • Developer Community 1036602, GitHub Issue 5009: Starting in Xamarin.Android 10.2, .pdb files were not included in the APK if the managed linker was enabled.

    • GitHub Issue 4996: application deploy on Android 11 emulator fails with Mono.AndroidTools.AdbException: secure_mkdirs failed: Permission denied

    • Github PR 5107: Starting in Xamarin.Android 11.0, building solutions in parallel with msbuild YourSolution.sln -m could fail with errors such as:

      obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource mipmap/ic_launcher (aka com.companyname.skiasharpsample:mipmap/ic_launcher) not found.
      obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource string/app_name (aka com.companyname.skiasharpsample:string/app_name) not found.
      obj\Release\100\android\manifest\AndroidManifest.xml(7,0): error APT2260: resource mipmap/ic_launcher_round (aka com.companyname.skiasharpsample:mipmap/ic_launcher_round) not found.
      obj\Release\100\android\manifest\AndroidManifest.xml(9,0): error APT2260: resource style/MainTheme.Splash (aka com.companyname.skiasharpsample:style/MainTheme.Splash) not found.
      Xamarin.Android.Aapt2.targets(226,3): error APT2067: failed processing manifest.
      

    All enhancements and issues fixed in Xamarin.Android 11.2

    GitHub enhancements

    GitHub bugs

    Developer Community

    Other changes in Xamarin.Android 11.2

    Other changes

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Installing

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 11.2 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.1.0.17(Nov 10, 2020)

    November 10, 2020 — Xamarin.Android 11.1.0.17 was published as part of Visual Studio 2019 version 16.8 and Visual Studio 2019 for Mac version 8.8.

    Corresponding Visual Studio 2019 release notes

    What's new compared to Xamarin.Android 11.0

    Deprecations, removals, and default configuration changes

    Build and deployment performance

    GitHub PR 4975: Cache the results of the FilterAssemblies MSBuild task in memory so they can be reused across different MSBuild targets during the build. This decreased incremental build times for the Xamarin.Forms source build from about 170 milliseconds to about 100 milliseconds on a test system. The savings will be bigger on larger solutions.

    android:extractNativeLibs set to "true" by default

    Starting in Xamarin.Android 11.0, projects that had references to the Xamarin.AndroidX NuGet packages or that were otherwise configured to use the improved manifest merging option would get a value of "false" by default for the android:extractNativeLibs Android manifest attribute due to changes in the latest version of the manifest merger tool from Google. Because this value had previously been "true" when left blank, this could cause unexpected behavior changes for Xamarin.Android applications. Xamarin.Android now sets this attribute to "true" by default even when using the improved manifest merging.

    According to the Android documentation, extractNativeLibs affects APK size and install size:

    Whether or not the package installer extracts native libraries from the APK to the filesystem. If set to false, then your native libraries must be page aligned and stored uncompressed in the APK. No code changes are required as the linker loads the libraries directly from the APK at runtime.

    This is a tradeoff that each developer should decide upon on a per-application basis. Is a smaller install size at the cost of a larger download size preferred?

    Xamarin.Android now emits android:extractNativeLibs="true" by default, preferring smaller APK sizes. You can get the opposite behavior with an AndroidManifest.xml such as:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
            android:versionCode="1" android:versionName="1.0" package="com.companyname.hello">
        <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="30" />
        <application android:label="Hello" android:extractNativeLibs="false" />
    </manifest>
    

    Corrected garbage collection behavior for Android bindings and bindings projects

    In previous Xamarin.Android versions, errors similar to JNI DETECTED ERROR IN APPLICATION: use of deleted global reference and JNI ERROR (app bug): attempt to use stale Global 0x2a2a (should be 0x2a26) could cause apps to abort under certain specific timing conditions where a managed garbage collection started just after a Java.Lang.Object subclass method call.

    The Xamarin.Android bindings project build process now includes a fix for this issue.

    The set of Android API bindings that are included directly as part of the Xamarin.Android SDK have been updated accordingly to include the fix.

    Note: This fix will not solve the problem for other bindings libraries until the libraries are rebuilt using this new Xamarin.Android version. Bindings library authors are therefore encouraged to build and publish new versions of their libraries using this new Xamarin.Android version at their earliest convenience.

    apksigner from Android SDK Build-Tools 30.0.3 now included

    Xamarin.Android now packages its own copy of the apksigner executable. The current included version is aligned with Android SDK Build-Tools 30.0.3.

    Attempting to use the upstream apksigner that's packaged in Android SDK Build-Tools 30.0 from the Android SDK Manager with Java JDK 8 results in the following error, as mentioned in the Xamarin.Android 11.0 release notes:

    java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    

    The new apksigner that is now included as part of Xamarin.Android matches the source version of the upstream tool but is built against Java JDK 8 so that Xamarin.Android can now use Android SDK Build-Tools 30.0 alongside Java JDK 8.

    Default Android SDK Platform-Tools version update to 30.0

    The default Android SDK Platform-Tools version has been updated from 29.0.5 to 30.0.4. This version can be changed per-project if needed via the AndroidSdkPlatformToolsVersion MSBuild property.

    Note: Unlike the Platform-Tools, the default Android SDK Build-Tools version is still 29.0.2 in this release. Projects that attempt to override the AndroidSdkBuildToolsVersion MSBuild property to a 30.0.x version will currently fail to build with an error similar to:

    error XA0032: Java SDK 11.0 or above is required when using Android SDK Build-Tools 30.0.0.
    

    This error will be removed in a future version now that Xamarin.Android provides its own version of apksigner that is compatible with Java JDK 8. Relatedly, Android SDK Build-Tools version 30.0.2 and higher as provided by the Android SDK Manager are now also compatible with Java JDK 8.

    Deprecation of Android Wear references in app projects

    Referencing an Android Wear application project from an Android phone application project is now deprecated and will produce a build warning similar to:

    warning XA4312: Referencing the Android Wear application project 'com.contoso.wearapp' from an Android application project is deprecated and will no longer be supported in a future version of Xamarin.Android. Remove the Android Wear application project reference from the Android application project and distribute the Wear application as a standalone application instead.
    

    To resolve this warning, remove the reference to Android Wear project from the phone application project and distribute the Android Wear project as a standalone Wear application instead.

    Soft deprecation of undocumented ProguardConfigFiles MSBuild property

    Xamarin.Android's ProGuard compatibility feature included an undocumented ProguardConfigFiles MSBuild property that could be used as an alternative to the ProguardConfiguration Build Action. That ProguardConfigFiles property is now deprecated.

    Any project authors who are currently using the ProguardConfigFiles MSBuild property are encouraged to update to the ProguardConfiguration Build Action instead.

    For example, a .csproj file could contain a use of the ProguardConfiguration MSBuild property similar to the following:

    <PropertyGroup>
      <ProguardConfigFiles>
        proguard1.cfg;
        proguard2.cfg;
      </ProguardConfigFiles>
    </PropertyGroup>
    

    To update a .csproj that contains a use of ProguardConfiguration like that, remove the ProguardConfiguration element from the .csproj file and instead set the proguard1.cfg and proguard2.cfg files to use the ProguardConfiguration Build Action. This adds the files as ProguardConfiguration items in the .csproj file:

    <ItemGroup>
      <ProguardConfiguration Include="proguard1.cfg" />
      <ProguardConfiguration Include="proguard2.cfg" />
    </ItemGroup>
    

    Issues fixed and other small changes

    Application and library build and deployment

    • Developer Community 1086457: Changes to libraries referenced by the .NET Standard library in a standard Xamarin.Forms solution were not reflected in the running app without a clean rebuild. More generally, this issue affected any library referenced indirectly via a .NET Standard library that had the ProduceReferenceAssembly MSBuild property set to true.

    • Developer Community 1120933: XABLD7019: System.UnauthorizedAccessException: Access to the path ... .lz4 is denied prevented projects from building successfully in the Release configuration if the managed linker was disabled in that configuration.

    • Developer Community 1141659: Starting in Xamarin.Android 11.0, the Updating Resources... build step could get stuck indefinitely if .DS_Store or any file starting with . was included in the project with the AndroidResource Build Action.

    • Developer Community 1141659: Starting in Xamarin.Android 11.0, the Updating Resources... build step could get stuck indefinitely if a NuGet package containing an AndroidResource file name starting with . was included in a project.

    • Developer Community 1144021 and GitHub 4990: Starting in Xamarin.Android 11.0, ADB0010: [INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2] build error could prevent apps from being deployed after AndroidManifest.xml changes.

    • Developer Community 1144910: Starting in Xamarin.Android 11.0, errors similar to error APT2260: resource mipmap/ic_launcher (aka com.companyname.skiasharpsample:mipmap/ic_launcher) not found and error CS0117: 'Resource' does not contain a definition for 'Layout' could prevent building projects when maximum number of parallel project builds was set higher than one in the Visual Studio options or when the -m switch was used in command line MSBuild builds.

    • Developer Community 1157593: Modifications to files set to use the AndroidAsset Build Action were not included as expected in incremental builds. Clean rebuilds were required to propagate the changes as expected.

    • Developer Community 1182026: Starting in Xamarin.Android 11.0, the Executing compile -o ... build step could get stuck indefinitely on certain systems where Environment.ProcessorCount returned 1.

    • GitHub 1597: Marshaling of java.util.Map instances in files set to use the AndroidInterfaceDescription Build Action was incorrect.

    • GitHub 4565: Errors or warnings similar to Missing class: com.android.tools.lint.detector.api.Detector could appear unexpectedly in the build output of apps that referenced custom Xamarin.Android bindings libraries for .aar files.

    • GitHub 4677: On Windows, running the InstallAndroidDependencies MSBuild target on the command line did not yet allow continuous build environments to install the Android SDK dependencies as expected.

    • GitHub 4818: Projects that had the undocumented AndroidAotMode MSBuild property set to the experimental Hybrid value did not strip away the IL from the resulting managed assemblies as expected.

    • GitHub PR 4824: No longer create NOTICE files in app packages.

    • GitHub PR 4829: No longer fast deploy Android resources for the Assemblies:Dexes fast deployment mode.

    • GitHub PR 4984: Avoid logging the full contents of item lists in diagnostic MSBuild logs in cases where MSBuild conditions only need to check if the item lists are empty or non-empty.

    • GitHub 4986: Updates to Android tooling (manifest-merger), caused //application/@android:extractNativeLibs to be set to "false" by default. This could cause an undesirable APK file size increase that was more noticeable for Xamarin.Android applications using AOT. Xamarin.Android now sets extractNativeLibs to "true" by default.

    • GitHub 4998: Files under lib/ must have .so extension, found 'lib/x86/gdbserver'. build error prevented building app bundles for projects with references to Android C++ library projects.

    • GitHub 5024: error XA0119: Using the shared runtime and Android App Bundles at the same time is not currently supported build error could mistakenly appear for Xamarin.Android class libraries when the AndroidPackageFormat MSBuild property was set to aab.

    • GitHub PR 5038: Errors similar to error APT2260: resource drawable/icon (aka com.contoso.androidapp:drawable/icon) not found could prevent building projects that were using ResizetizerNT and google-services.json together. The build system has now been updated to ensure each resource directory has its own unique cache file.

    • GitHub 5043: i686-linux-android-ld.EXE: error: cannot open ... Debug\monoandroid10.0\android\typemaps.x86.o: No such file or directory could prevent building projects located under paths that contained .s.

    • GitHub 5049: Starting in Visual Studio 2019 version 16.7, build errors similar to Feature 'XYZ' is not available in C# 7.3. Please use language version 8.0 or greater. could prevent projects from using C# 8.0 language features.

    Application behavior on device and emulator

    • GitHub 4098: Exceptions similar to java.lang.ClassCastException: mono.android.runtime.JavaObject cannot be cast to float[] prevented passing certain C# types to some Android APIs.

    • GitHub 4632: UNHANDLED EXCEPTION was shown unexpectedly in the application output in certain cases for handled exceptions that had been propagated through both Java and managed code.

    • GitHub 4893: System.ArgumentNullException: Value cannot be null ... at Java.Interop.TypeManager.RegisterType (System.String java_class, System.Type t) could prevent launching apps on Android 9.0 Pie (API level 28) x86 emulators.

    • GitHub 4989: Calling this.Dispose() from within a Java.Lang.Object.Dispose(bool) override threw a System.ArgumentException.

    Android API bindings

    • GitHub PR 5106: Bindings for overloads of Map.Of() that took more than fourteen parameters were not yet available.

    Bindings projects

    • GitHub 4956: warning MSB6002: The command-line for the "BindingsGenerator" task is too long could prevent building bindings library projects, most commonly when they referenced Xamarin.AndroidX NuGet packages.

    • GitHub 5027: Syntax errors similar to ) expected could prevent building bindings projects after updating the Compile using Android version: (Target Framework) setting to Android 11 (R).

    • Java.Interop GitHub PR 672: For nested Java types that have protected visibility within sealed types, generate bindings that have private visibility to avoid C# warning CS0628.

    • Java.Interop GitHub 682: Ignorable warning BG8604: top ancestor ... not found for nested type ... appeared for public types nested under non-public types in Kotlin libraries. Those nested types are now skipped as expected.

    • Java.Interop GitHub 694: Kotlin synthetic constructors were not yet ignored, resulting in unactionable error messages such as:

      Error while processing '[Constructor] MaterialDialog(android.content.Context p0, com.afollestad.materialdialogs.DialogBehavior p1, int p2, kotlin.jvm.internal.DefaultConstructorMarker p3)' in '[Class] com.afollestad.materialdialogs.MaterialDialog': Type 'kotlin.jvm.internal.DefaultConstructorMarker' was not found.
      
    • Java.Interop GitHub 717: Error while processing type ... Type 'android.app.IntentService' was not found. prevented building bindings for libraries with classes that inherited from android.app.IntentService.

    • Java.Interop GitHub 719: Bindings did not yet use GC.KeepAlive() calls to ensure that method arguments would never be garbage collected before they were passed to Java.

    Application publishing

    • GitHub 4949: The VtsVndkDependencyTest test from the Android Vendor Test Suite would not pass for Xamarin.Android apps installed into system ROMs by device vendors.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.12 runtime and class libraries from Commit 83105ba2 to Commit be2226b5, adding 17 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    • Mono GitHub 8806: DWARF debugging symbols were incorrect for projects configured to use AOT Compilation with Use LLVM Optimizing Compiler.

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Versions for continuous build environments

    For users installing Xamarin.Android on macOS continuous build environments, the corresponding version of the Mono Framework MDK to use is Mono Framework MDK 6.12.0.93.

    For special scenarios where users require Xamarin.Android SDK version 11.1.0.17 without any subsequent 11.1 servicing fixes, the fixed-version Visual Studio 2019 version 16.8.0 BuildTools installer can be used on Windows, and the fixed-version .pkg installer package can be used on macOS. The fixed-version .vsix installer package is another alternative for Windows.

    Open source

    Xamarin.Android 11.1 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.1.0.15(Oct 13, 2020)

    October 13, 2020 — Xamarin.Android 11.1.0.15 was published as part of Visual Studio 2019 version 16.8 Preview 4 and Visual Studio 2019 for Mac version 8.8 Preview 4.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Corrected garbage collection behavior for Android bindings and bindings projects

    In previous Xamarin.Android versions, errors similar to JNI DETECTED ERROR IN APPLICATION: use of deleted global reference and JNI ERROR (app bug): attempt to use stale Global 0x2a2a (should be 0x2a26) could cause apps to abort under certain specific timing conditions where a managed garbage collection started just after a Java.Lang.Object subclass method call.

    The Xamarin.Android bindings project build process now includes a fix for this issue.

    The set of Android API bindings that are included directly as part of the Xamarin.Android SDK have been updated accordingly to include the fix.

    Note: This fix will not solve the problem for other bindings libraries until the libraries are rebuilt using this new Xamarin.Android version. Bindings library authors are therefore encouraged to build and publish new versions of their libraries using this new Xamarin.Android version at their earliest convenience.

    Issues fixed

    Application and library build and deployment

    • Developer Community 1141659: Starting in Xamarin.Android 11.0, the Updating Resources... build step could get stuck indefinitely if .DS_Store or any file starting with . was included in the project with the AndroidResource Build Action.
    • Developer Community 1141659: Starting in Xamarin.Android 11.0, the Updating Resources... build step could get stuck indefinitely if a NuGet package containing an AndroidResource file name starting with . was included in a project.
    • Developer Community 1144910: Starting in Xamarin.Android 11.0, errors similar to error APT2260: resource mipmap/ic_launcher (aka com.companyname.skiasharpsample:mipmap/ic_launcher) not found and error CS0117: 'Resource' does not contain a definition for 'Layout' could prevent building projects when maximum number of parallel project builds was set higher than one in the Visual Studio options or when the -m switch was used in command line MSBuild builds.
    • Developer Community 1182026: Starting in Xamarin.Android 11.0, the Executing compile -o ... build step could get stuck indefinitely on certain systems where Environment.ProcessorCount returned 1.
    • GitHub 4677: On Windows, running the InstallAndroidDependencies MSBuild target on the command line did not yet allow continuous build environments to install the Android SDK dependencies as expected.
    • GitHub 5043: i686-linux-android-ld.EXE: error: cannot open ... Debug\monoandroid10.0\android\typemaps.x86.o: No such file or directory could prevent building projects located under paths that contained .s.

    Android API bindings

    • GitHub PR 5106: Bindings for overloads of Map.Of() that took more than fourteen parameters were not yet available.

    Bindings projects

    • GitHub 5027: Syntax errors similar to ) expected could prevent building bindings projects after updating the Compile using Android version: (Target Framework) setting to Android 11 (R).
    • Java.Interop GitHub 682: Ignorable warning BG8604: top ancestor ... not found for nested type ... appeared for public types nested under non-public types in Kotlin libraries. Those nested types are now skipped as expected.
    • Java.Interop GitHub 717: Error while processing type ... Type 'android.app.IntentService' was not found. prevented building bindings for libraries with classes that inherited from android.app.IntentService.
    • Java.Interop GitHub 719: Bindings did not yet use GC.KeepAlive() calls to ensure that method arguments would never be garbage collected before they were passed to Java.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.12 runtime and class libraries from Commit 83105ba2 to Commit be2226b5, adding 17 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    • Mono GitHub 8806: DWARF debugging symbols were incorrect for projects configured to use AOT Compilation with Use LLVM Optimizing Compiler.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 11.1 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.1.0.17-pre(Oct 20, 2020)

    October 20, 2020 — Xamarin.Android 11.1.0.17 was published as part of Visual Studio 2019 version 16.8 Preview 5 and Visual Studio 2019 for Mac version 8.8 Preview 5

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Default Android SDK Platform-Tools version update to 30.0

    The default Android SDK Platform-Tools version has been updated from 29.0.5 to 30.0.4. This version can be changed per-project if needed via the AndroidSdkPlatformToolsVersion MSBuild property.

    Issues fixed

    Bindings projects

    • GitHub 5027: Syntax errors similar to ) expected could prevent building bindings projects after updating the Compile using Android version: (Target Framework) setting to Android 11 (R).

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 11.1 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.1.0.3(Sep 14, 2020)

    September 14, 2020 — Xamarin.Android 11.1.0.3 was published as part of Visual Studio 2019 version 16.8 Preview 3 and Visual Studio 2019 for Mac version 8.8 Preview 3.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    android:extractNativeLibs set to "true" by default

    Starting in Xamarin.Android 11.0, projects that had references to the Xamarin.AndroidX NuGet packages or that were otherwise configured to use the improved manifest merging option would get a value of "false" by default for the android:extractNativeLibs Android manifest attribute due to changes in the latest version of the manifest merger tool from Google. Because this value had previously been "true" when left blank, this could cause unexpected behavior changes for Xamarin.Android applications. Xamarin.Android now now sets this attribute it to "true" by default even when using the improved manifest merging.

    According to the Android documentation, extractNativeLibs affects APK size and install size:

    Whether or not the package installer extracts native libraries from the APK to the filesystem. If set to false, then your native libraries must be page aligned and stored uncompressed in the APK. No code changes are required as the linker loads the libraries directly from the APK at runtime.

    This is a tradeoff that each developer should decide upon on a per-application basis. Is a smaller install size at the cost of a larger download size preferred?

    Xamarin.Android now emits android:extractNativeLibs="true" by default, preferring smaller APK sizes. You can get the opposite behavior with an AndroidManifest.xml such as:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
            android:versionCode="1" android:versionName="1.0" package="com.companyname.hello">
        <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="30" />
        <application android:label="Hello" android:extractNativeLibs="false" />
    </manifest>
    

    apksigner from Android SDK Build-Tools 30.0.3 now included

    Xamarin.Android now packages its own copy of the apksigner executable. The current included version is aligned with Android SDK Build-Tools 30.0.3.

    Attempting to use the upstream apksigner that's packaged in Android SDK Build-Tools 30.0 from the Android SDK Manager with Java JDK 8 results in the following error, as mentioned in the Xamarin.Android 11.0 release notes:

    java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    

    The new apksigner that is now included as part of Xamarin.Android matches the source version of the upstream tool but is built against Java JDK 8 so that Xamarin.Android can now use Android SDK Build-Tools 30.0 alongside Java JDK 8.

    Issues fixed

    Application and library build and deployment

    • Developer Community 1144021 and GitHub 4990: Starting in Xamarin.Android 11.0, ADB0010: [INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2] build error could prevent apps from being deployed after AndroidManifest.xml changes.

    • Developer Community 1157593: Modifications to files set to use the AndroidAsset Build Action were not included as expected in incremental builds. Clean rebuilds were required to propagate the changes as expected.

    • GitHub 1597: Marshaling of java.util.Map instances in files set to use the AndroidInterfaceDescription Build Action was incorrect.

    • GitHub 4986: Updates to Android tooling (manifest-merger), caused //application/@android:extractNativeLibs to be set to "false" by default. This could cause an undesirable APK file size increase that was more noticeable for Xamarin.Android applications using AOT. Xamarin.Android now sets extractNativeLibs to "true" by default.

    • GitHub 4998: Files under lib/ must have .so extension, found 'lib/x86/gdbserver'. build error prevented building app bundles for projects with references to Android C++ library projects.

    • GitHub 5024: error XA0119: Using the shared runtime and Android App Bundles at the same time is not currently supported build error could mistakenly appear for Xamarin.Android class libraries when the AndroidPackageFormat MSBuild property was set to aab.

    • GitHub PR 5038: Errors similar to error APT2260: resource drawable/icon (aka com.contoso.androidapp:drawable/icon) not found could prevent building projects that were using ResizetizerNT and google-services.json together. The build system has now been updated to ensure each resource directory has its own unique cache file.

    • GitHub 5049: Starting in Visual Studio 2019 version 16.7, build errors similar to Feature 'XYZ' is not available in C# 7.3. Please use language version 8.0 or greater. could prevent projects from using C# 8.0 language features.

    Application behavior on device and emulator

    • GitHub 4989: Calling this.Dispose() from within a Java.Lang.Object.Dispose(bool) override threw a System.ArgumentException.

    Bindings projects

    • Java.Interop GitHub 694: Kotlin synthetic constructors were not yet ignored, resulting in unactionable error messages such as:

      Error while processing '[Constructor] MaterialDialog(android.content.Context p0, com.afollestad.materialdialogs.DialogBehavior p1, int p2, kotlin.jvm.internal.DefaultConstructorMarker p3)' in '[Class] com.afollestad.materialdialogs.MaterialDialog': Type 'kotlin.jvm.internal.DefaultConstructorMarker' was not found.
      

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 11.1 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.0.99.34(Aug 26, 2020)

    August 25, 2020 — Xamarin.Android 11.0.99.34 was published as part of Visual Studio 2019 version 16.8 Preview 2 and Visual Studio 2019 for Mac version 8.8 Preview 2.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Build and deployment performance in Xamarin.Android 11.0.99.34

    GitHub PR 4975: Cache the results of the FilterAssemblies MSBuild task in memory so they can be reused across different MSBuild targets during the build. This decreased incremental build times for the Xamarin.Forms source build from about 170 milliseconds to about 100 milliseconds on a test system. The savings will be bigger on larger solutions.

    Deprecation of Android Wear references in app projects

    Referencing an Android Wear application project from an Android phone application project is now deprecated and will produce a build warning similar to:

    warning XA4312: Referencing the Android Wear application project 'com.contoso.wearapp' from an Android application project is deprecated and will no longer be supported in a future version of Xamarin.Android. Remove the Android Wear application project reference from the Android application project and distribute the Wear application as a standalone application instead.
    

    To resolve this warning, remove the reference to Android Wear project from the phone application project and distribute the Android Wear project as a standalone Wear application instead.

    Issues fixed and other small changes in Xamarin.Android 11.0.99.34

    Application and library build and deployment

    • Developer Community 1086457: Changes to libraries referenced by the .NET Standard library in a standard Xamarin.Forms solution were not reflected in the running app without a clean rebuild. More generally, this issue affected any library referenced indirectly via a .NET Standard library that had the ProduceReferenceAssembly MSBuild property set to true.
    • Developer Community 1120933: XABLD7019: System.UnauthorizedAccessException: Access to the path ... .lz4 is denied prevented projects from buidling successfully in the Release configuration if the managed linker was disabled in that configuration.
    • GitHub 4565: Errors or warnings similar to Missing class: com.android.tools.lint.detector.api.Detector could appear unexpectedly in the build output of apps that referenced custom Xamarin.Android bindings libraries for .aar files.
    • GitHub PR 4984: Avoid logging the full contents of item lists in diagnostic MSBuild logs in cases where MSBuild conditions only need to check if the item lists are empty or non-empty.

    Application behavior on device and emulator

    • GitHub 4893: System.ArgumentNullException: Value cannot be null ... at Java.Interop.TypeManager.RegisterType (System.String java_class, System.Type t) could prevent launching apps on Android 9.0 Pie (API level 28) x86 emulators.

    Bindings projects

    • GitHub 4956: warning MSB6002: The command-line for the "BindingsGenerator" task is too long could prevent building bindings library projects, most commonly when they referenced Xamarin.AndroidX NuGet packages.

    Application publishing

    • GitHub 4949: The VtsVndkDependencyTest test from the Android Vendor Test Suite would not pass for Xamarin.Android apps installed into system ROMs by device vendors.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 11.1 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.0.2.0(Aug 19, 2020)

    August 18, 2020 — Xamarin.Android 11.0.2.0 was published as part of in Visual Studio 2019 version 16.7.2 and Visual Studio 2019 for Mac version 8.7.3.

    Issues fixed in Xamarin.Android 11.0.2.0

    Application behavior on device and emulator

    • Developer Community 1139203, GitHub 4983: Starting in Xamarin.Android 11.0, 'Could not load library: Library '/system/lib64/libmonodroid.so' not found.' ... Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) prevented some application projects from launching successfully in certain build configurations.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Versions for continuous build environments

    For users installing Xamarin.Android on macOS continuous build environments, the corresponding version of the Mono Framework MDK to use is Mono Framework MDK 6.12.0.89.

    For special scenarios where project authors require Xamarin.Android SDK version 11.0.2.0 without any subsequent 11.0 servicing fixes, the fixed-version Visual Studio 2019 version 16.7.2 BuildTools installer can be used on Windows and the fixed-version .pkg installer package can be used on macOS. The fixed-version .vsix installer package is another alternative for Windows.

    Open source

    Xamarin.Android 11.0 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.0.99.9(Aug 5, 2020)

    August 5, 2020 — Xamarin.Android 11.0.99.9 was published as part of Visual Studio 2019 version 16.8 Preview 1 and Visual Studio 2019 for Mac version 8.8 Preview 1.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Soft deprecation of undocumented ProguardConfigFiles MSBuild property

    Since back when ProGuard compatibility was originally added to Xamarin.Android, the feature has included an undocumented ProguardConfigFiles MSBuild property that could be used as an alternative to the ProguardConfiguration Build Action.

    Any project authors who are currently using the ProguardConfigFiles MSBuild property are encouraged to update to the ProguardConfiguration Build Action instead.

    For example, a .csproj file could contain a use of the ProguardConfiguration MSBuild property similar to the following:

    <PropertyGroup>
      <ProguardConfigFiles>
        proguard1.cfg;
        proguard2.cfg;
      </ProguardConfigFiles>
    </PropertyGroup>
    

    To update a .csproj that contains a use of ProguardConfiguration like that, remove the ProguardConfiguration element from the .csproj file and instead set the proguard1.cfg and proguard2.cfg to use the ProguardConfiguration Build Action. This adds the files as ProguardConfiguration items in the .csproj file:

    <ItemGroup>
      <ProguardConfiguration Include="proguard1.cfg" />
      <ProguardConfiguration Include="proguard2.cfg" />
    </ItemGroup>
    

    Issues fixed and other small changes

    Application and library build and deployment

    Application behavior on device and emulator

    • GitHub 4098: Exceptions similar to java.lang.ClassCastException: mono.android.runtime.JavaObject cannot be cast to float[] prevented passing certain C# types to some Android APIs.
    • GitHub 4632: UNHANDLED EXCEPTION was shown unexpectedly in the application output in certain cases for handled exceptions that had been propagated through both Java and managed code.

    Bindings projects

    • Java.Interop GitHub PR 672: Nested Java types with protected visibility within sealed types are now generated with private visibility, avoiding C# warning CS0628.

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 11.1 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.0.0.3(Aug 5, 2020)

    August 5, 2020 — Xamarin.Android 11.0.0.3 was published as part of Visual Studio 2019 version 16.7 and Visual Studio 2019 for Mac version 8.7.

    Corresponding Visual Studio 2019 release notes

    What's new compared to Xamarin.Android 10.3

    Deprecations, removals, and default configuration changes

    Build and deployment performance

    • GitHub PR 4190: Switch to running AAPT2 in single-file mode rather than --dir mode. This reduced the total incremental build time from about 16.4 seconds to about 5.5 seconds for a test project when a single Android resource file was changed between builds.
    • GitHub PR 4750: Skip checking for uses of AppDomain.CreateDomain() in assemblies provided by Xamarin.Android. This reduced the time for the LinkAssembliesNoShrink from about 2.6 seconds to about 1.8 seconds for an initial clean build of small Xamarin.Forms test app.
    • Java.Interop GitHub PR 624, Java.Interop GitHub PR 627, Java.Interop GitHub PR 628: Update the CRC-64 algorithm used during builds to take advantage of a more efficient calculation technique. This reduced the total incremental build time from about 8.7 seconds to about 8.5 seconds for a small Xamarin.Forms app when one line of a C# file was changed between builds.

    Smaller app package sizes

    Managed assemblies are now compressed by default for Release configuration builds, resulting in significantly smaller APK and Android App Bundle sizes. Assemblies are compressed with the LZ4 algorithm during builds and then decompressed on device during app startup.

    For a small example Xamarin.Forms application, this reduced the APK size from about 23 megabytes to about 17 megabytes while only increasing the time to display the first page of the app from about 780 milliseconds to about 790 milliseconds.

    If needed, the new behavior can be disabled for a particular project by opening the project file in Visual Studio or another text editor and setting the AndroidEnableAssemblyCompression MSBuild property to false in the .csproj file:

    <PropertyGroup>
      <AndroidEnableAssemblyCompression>false</AndroidEnableAssemblyCompression>
    </PropertyGroup>
    

    Note: This feature is intended to replace the older Bundle assemblies into native code Visual Studio Enterprise feature for purposes of app size savings. The AndroidEnableAssemblyCompression property takes precedence if both features are enabled. Project authors who no longer need the Bundle assemblies into native code feature can now disable it or remove the BundleAssemblies MSBuild property from the .csproj file:

     <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
       <DebugSymbols>True</DebugSymbols>
       <DebugType>portable</DebugType>
       <Optimize>True</Optimize>
       <OutputPath>bin\Release\</OutputPath>
       <DefineConstants>TRACE</DefineConstants>
       <ErrorReport>prompt</ErrorReport>
       <WarningLevel>4</WarningLevel>
       <AndroidManagedSymbols>true</AndroidManagedSymbols>
       <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
       <AndroidLinkMode>SdkOnly</AndroidLinkMode>
       <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
    -  <BundleAssemblies>true</BundleAssemblies>
     </PropertyGroup>
    

    Background information

    For comparison, for the small test Xamarin.Forms application with all target ABIs enabled, the Bundle assemblies into native code feature increases the APK size from about 23 megabytes to about 26 megabytes while increasing the time to display the first page of the app from about 780 milliseconds to about 850 milliseconds.

    If only one target ABI is enabled for the test application, such as arm64-v8a, the Bundle assemblies into native code feature decreases the APK size from around 16 megabytes to around 7.5 megabytes, while the new LZ4 approach decreases the size to around 8 megabytes. Time to display the first page is the same in this case as with all target ABIs enabled.

    The number of target ABIs affects the size comparison because Bundle assemblies into native code uses a separate copy of the compressed assemblies for each ABI, while the new LZ4 approach shares them across all target ABIs.

    Bindings for Android 11 Beta

    This version includes bindings for the Android 11 Beta from Google. See the Android 11 Beta documentation for additional information about the behavior and API changes in this new Android version. Because Android 11 Beta provides the finalized SDK and NDK APIs, the Xamarin.Android bindings are now also finalized and the Xamarin.Android SDK version number has been updated to 11.0. To use the bindings for the new APIs in a Xamarin.Android project, set Compile using Android version: (Target Framework) to Android 11 (R) under the Application tab of the Visual Studio project property pages. This sets the TargetFrameworkVersion property to v11.0 in the .csproj file:

    <TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
    

    Note: The default and recommended Android SDK Build-Tools version for Xamarin.Android is still 29 because Build-Tools version 30.0 currently requires Java JDK 9 or higher, while both Xamarin.Android and Android Studio still require JDK 8. Android SDK Build-Tools 29 is compatible with the Android 11 bindings, so it is recommended to continue using Android SDK Build-Tools 29 for now.

    Attempting to use Android SDK Build-Tools 30.0 with Java JDK 8 results in the following error:

    java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    

    Project authors who wish to try Android SDK Build-Tools 30.0 can follow the steps under Preliminary Java JDK 11 compatibility to install and configure Java JDK 11.

    New features

    These bindings take advantage of C# 8.0's support for default and static interface members to provide C# interface APIs that more closely match the original Android APIs.

    For example, in the Android.Views.TextClassifiers namespace, TextClassifier.HintTextIsEditable is now available as ITextClassifier.HintTextIsEditable, and the old TextClassifier.HintTextIsEditable field is marked [Obsolete].

    Note: An older set of bindings for interface constants were also available in Consts classes like TextClassifierConsts in earlier target framework versions. Those classes were marked [Obsolete] for several years. They have been removed completely for the Android 11 (R) target framework version. Project authors are encouraged to switch to the new interface members like ITextClassifier.HintTextIsEditable at their earliest convenience.

    Preliminary Java JDK 11 compatibility

    Xamarin.Android can now use Java JDK 11 to build libraries and applications.

    JDK 11 is not yet installed or required by default for Xamarin.Android, but the apksigner tool in Android SDK Build-Tools version 30 does require JDK 11, so project authors who are using the bindings for Android 11 Beta and want to experiment with setting the AndroidSdkBuildToolsVersion MSBuild property to version 30.0.0 or higher will need to use JDK 11.

    To do so:

    1. Install a distribution of JDK 11, such as JetBrains Runtime jbrsdk.

    2. On Windows, open Tools > Options in Visual Studio, select the Xamarin > Android Settings node, and set Java Development Kit Location to the root of the JDK 11 installation.

      On macOS, open Visual Studio > Preferences, select the Projects > SDK Locations > Android node, open the Locations tab, and set the Java SDK (JDK) Location to the root of the JDK 11 installation.

      Alternatively, to configure the JDK path per project, open the project file in Visual Studio or another text editor and set the JavaSdkDirectory MSBuild property to the root of the JDK 11 installation. For example:

      <PropertyGroup>
        <JavaSdkDirectory>C:\Program Files\jbrsdk</JavaSdkDirectory>
      </PropertyGroup>
      

    Note: The error that appears when attempting to use Android SDK Build-Tools 30.0 th Java JDK 8 is:

    java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    

    Known Issues

    • GitHub 4789: error XACLP7004: System.ArgumentException: Directory ... obj\Debug\javadocs...' does not appear to be an android doc reference directory. prevents using the JavaSourceJar Build Action in bindings projects.

    Mono.Android nullable reference types compatibility

    The Mono.Android assembly has been annotated for compatibility with C# 8.0 nullable reference type checks. Projects can now optionally place code that uses types from Mono.Android in a nullable context to take advantage of additional compiler nullability checks. For example, to enable nullability checks for all code in a project, set the Nullable MSBuild property to enable in the .csproj file:

    <PropertyGroup>
      <Nullable>enable</Nullable>
    </PropertyGroup>
    

    When this property set, the build will emit warnings if any code does not properly account for possible null values passed into or returned from APIs in the Mono.Android assembly.

    See the nullable reference types documentation for more information.

    Note: The majority of Mono.Android, including the nullability annotations, is automatically generated from the Android Java source. The annotations intentionally preserve any upstream bugs in the nullability information provided by the Android source code.

    Tidier IntelliSense suggestions for Java.Lang.Object subclasses

    Java.Lang.Object contains several properties and methods that are required to be public to support Xamarin.Android Java bindings but are not intended to be used in hand-written code. These members are now hidden from IntelliSense, making it easier to find the useful members.

    Example IntelliSense suggestions before and after

    Bindings projects support for methods with more than 14 parameters

    Xamarin.Android bindings projects now support binding Java methods that have any number of parameters instead of the previous limit of 14.

    Bindings projects enumeration enhancements

    The Transforms\EnumFields.xml file in bindings projects now allows <mapping> and <field> elements that use just clr-enum-type and clr-name attributes, with no jni-interface or jni-name attributes. This provides additional flexibility to define custom C# enumerations that are visible to the bindings generation process and do not correspond to any Java type in the bound Java library. For example:

    <mapping clr-enum-type='Contoso.Permissions' bitfield='true'>
      <field clr-name='Read' value='0' />
      <field clr-name='Write' value='1' />
      <field clr-name='Execute' value='2' />
    </mapping>
    

    For enumerations that do correspond to Java types, project authors should continue to include the jni-interface and jni-name attributes as before.

    JI_JAVA_HOME environment variable for custom Java JDK paths

    Xamarin.Android will now look for the contents of an environment variable named JI_JAVA_HOME as another way to customize the Java JDK path used during the build. In cases where both the JI_JAVA_HOME environment variable and the JavaSdkDirectory MSBuild property are set to custom values, the MSBuild property takes precedence.

    In general, this environment does not need to be adjusted, but in certain special scenarios, having the option to customize the JDK path via an environment variable might provide useful flexibility.

    XA1023 warning for upcoming DX DEX compiler deprecation

    Projects that have Dex compiler set to dx in the Visual Studio project property pages will now get a build warning:

    warning XA1023: Using the DX DEX Compiler is deprecated. Please update `$(AndroidDexTool)` to `d8`.
    

    To resolve this warning, set the Dex compiler in the Visual Studio project property pages to d8 or edit the project file in Visual Studio or another text editor and set the AndroidDexTool MSBuild property to d8:

    <PropertyGroup>
      <AndroidDexTool>d8</AndroidDexTool>
    </PropertyGroup>
    

    Background information

    Google has deprecated the DX DEX compiler in favor of the D8 DEX compiler. After February 1, 2021, DX will no longer be a part of the Android SDK or Android Studio. Project authors are encouraged to migrate their projects to D8 at their earliest convenience to prepare for this change.

    Other warning and error changes

    Updated XA0113 warning for Google Play submission requirements

    The XA0113 warning has been updated to reflect a more recent minimum target version of Android 9 (API level 28) for submissions to the Google Play store. The following warning will now appear for projects that have an earlier version set under Compile using Android version: (Target Framework) in the Visual Studio project property pages:

    warning XA0113: Google Play requires that new applications and updates must use a TargetFrameworkVersion of v9.0 (API level 28) or above. You are currently targeting v8.0 (API level 26).
    

    XA0119 error for incompatible use of Android App Bundle format in Debug configuration

    The Android App Bundle publishing format is not currently compatible with the recommended fast deployment settings for Debug configuration deployments. Previously, projects that had Android Package Format (AndroidPackageFormat) set to aab in the Debug configuration that also had the recommended Use Shared Runtime (Use Shared Mono Runtime on macOS) setting enabled would produce a build warning and then fail to launch on device.

    Because this configuration is not currently supported, Xamarin.Android now produces an error for it instead of a warning:

    error XA0119: Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
    

    To resolve this error, change the Android Package Format setting in the Visual Studio project property pages to apk for the Debug configuration. This corresponds to the apk value for the AndroidPackageFormat MSBuild property in the .csproj file:

    <PropertyGroup>
      <AndroidPackageFormat>apk</AndroidPackageFormat>
    </PropertyGroup>
    

    This error is only relevant for Debug configuration builds. Release configuration builds can continue to use the Android App Bundle packaging format.

    Bindings projects XA4231 warning for deprecated jar2xml parser

    Any bindings project that has the AndroidClassParser MSBuild property set to the old jar2xml parser or any other unrecognized value will now get a XA4231 build warning:

    warning XA4231: The Android class parser 'jar2xml' is deprecated and will be removed in a future version of Xamarin.Android. Update the project properties to use 'class-parse' instead.
    

    To resolve this warning, update the Android Class Parser setting in the Visual Studio project property pages or the .jar file parser setting in Visual Studio for Mac to class-parse. This corresponds to the class-parse value for the AndroidClassParser MSBuild property in the .csproj file:

    <PropertyGroup>
      <AndroidClassParser>class-parse</AndroidClassParser>
    </PropertyGroup>
    

    Bindings projects XA4232 warning for deprecated XamarinAndroid code generation target

    Any bindings project that has the AndroidCodegenTarget MSBuild property set to the old XamarinAndroid code generation target or any other unrecognized value will now get a XA4232 build warning:

    warning XA4232: The Android code generation target value 'XamarinAndroid' is deprecated and will be removed in a future version of Xamarin.Android. Update the project properties to use 'XAJavaInterop1'.
    

    To resolve this warning, update the Android Codegen target setting in the Visual Studio project property pages or the Code generation target setting in Visual Studio for Mac to XAJavaInterop1. This corresponds to the XAJavaInterop1 value for the AndroidCodegenTarget MSBuild property in the .csproj file:

    <PropertyGroup>
      <AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
    </PropertyGroup>
    

    Tool and library version updates

    D8 and R8 version update to 1.6.82

    The version of the D8 DEX compiler and R8 code shrinker included in Xamarin.Android has been updated from 1.5.68 to 1.6.82.

    bundletool version update to 0.14.0

    The version of the bundletool executable included in Xamarin.Android has been updated from 0.10.2 to 0.14.0, bringing in several improvements and bug fixes.

    AAPT2 version update to 4.0.0

    The version of the Android Asset Packaging Tool AAPT2 included in Xamarin.Android has been updated from 3.5.3 to 4.0.0.

    Manifest merger tool version update to 27.0.0

    The version of the manifest merger tool included in Xamarin.Android has been updated from 26.5.0 to 27.0.0.

    ProGuard version update to 6.2.2

    The version of ProGuard included in Xamarin.Android has been updated from 5.3.2 to 6.2.2, bringing in a number of improvements and bug fixes.

    Note: ProGuard is only relevant for projects configured to use the older DX DEX compiler. Project authors are recommended to update to the newer D8 DEX compiler at their earliest convenience.

    Mono.Data.Sqlite SQLite version update

    The version of SQLite used by Mono.Data.Sqlite in Xamarin.Android has been updated from 3.31.1 to 3.32.1, bringing in security fixes, improvements, and bug fixes.

    Issues fixed in Xamarin.Android 11.0.0.3

    Design-time builds

    Application behavior on device and emulator

    • Developer Community 970610, Java.Interop GitHub 661: System.TypeLoadException: 'Could not load type 'Android.App.Application.IActivityLifecycleCallbacks' could cause apps using the Android 11 Developer Preview bindings to abort during startup.
    • Developer Community 1045818: Starting in Xamarin.Android 10.3 on Windows, errors similar to Java.Lang.RuntimeException: 'Font asset not found Fonts/fontello.ttf' could cause apps to abort unexpectedly on device after they were updated and redeployed from Visual Studio on Windows.
    • Developer Community 1050379, GitHub 4795: Starting in Xamarin.Android 10.3, Unable to activate instance of type Android.Util.SparseArray`1[E] could cause apps built in the Debug configuration to abort.
    • GitHub 3784, GitHub 4471: An outdated version of the Mono Shared Runtime package was sometimes left on target development devices and emulators after Xamarin.Android version updates. This could result in unexpected behaviors in Debug configuration apps until the old shared runtime was manually uninstalled.
    • GitHub 4152: Unable to read profile ... The system cannot find the file specified prevented the FinishAotProfiling MSBuild target from completing successfully if the location of adb was not in the PATH environment variable.
    • GitHub 4542: error CS1681: You cannot redefine the global extern alias prevented building app projects successfully if the .csproj file included global in the <Aliases></Aliases> metadata element of a referenced Xamarin.Android class library.
    • GitHub PR 4589: ObjectDisposedException could in theory be thrown during cancellation of AndroidClientHandler requests, depending on the particular timing of cancellation and object disposal. The time window where this can happen is now narrower.
    • GitHub 4662: In projects configured to use the recently added manifestmerger.jar Android manifest merging option, tools:node="remove" did not yet remove AndroidManifest.xml nodes generated by C# attributes in referenced library projects.
    • GitHub 4772, GitHub 4852: System.DllNotFoundException: libmono-native.so assembly:<unknown assembly> type:<unknown type> member:(null) could cause apps to abort during startup on certain Android 5.0 Lollipop (API level 21) and Android 5.1 Lollipop (API level 22) devices.
    • GitHub PR 4779: error XA1011: Using ProGuard with the D8 DEX compiler is no longer supported. Please update `$(AndroidLinkTool)` to `r8`. did not mention the corresponding term code shrinker that is used in the Visual Studio project property pages and did not mention that AndroidLinkTool is an MSBuild property.
    • GitHub 4791: Starting in Xamarin.Android 10.3, many typemap: module matching MVID [...] not found. messages were logged to the application output for certain running apps, obscuring other logging statements of interest. These messages were diagnostic and did not indicate problems in the apps.
    • GitHub 4805: Starting in Xamarin.Android 10.3, localized resources from .resx files in Xamarin.Android application projects were no longer deployed when building and deploying from within Visual Studio to an attached device or emulator. In contrast, clean builds started on the command line worked as expected.
    • GitHub 4809: Starting in Xamarin.Android 10.3, System.MemberAccessException: Cannot create an instance of ... could cause apps built in the Debug configuration to abort when attempting to use certain APIs involving types that have both generic and non-generic versions such as Android.Widget.ArrayAdapter.
    • GitHub PR 4846: On Android 11 (API level 30) devices and emulators, java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_30! caused apps to abort during startup for projects with the Target Android version set to API level 30 in the Android Manifest tab of the project property pages.

    Application and library build and deployment

    • Developer Community 1061307 Changes to files set to use the LinkDescription Build Action were not included as expected in incremental builds. Clean rebuilds were required to propagate the changes as expected.
    • Developer Community 1076396: DllImport error loading library '__Internal': 'Could not load library: Library '/system/lib64/libmonodroid.so' not found.' caused apps to abort during startup when built in an unsupported Debug configuration, with Android Package Format set to aab, because the build only provided a warning. The build now produces an error instead.
    • GitHub 2042: The Mono.Android assembly did not yet surface the nullability information provided by the upstream Android source code for use in C# 8.0 nullable contexts.
    • GitHub 4439: Invalid values of the AndroidDexTool MSBuild property produced a misleading error during deployment instead of an error during the build. Invalid values are now ignored and the default D8 DEX tool is used instead.
    • GitHub PR 4578: The source directory is under the output directory. Skip it. build error did not yet mention the relevant MSBuild item type or the current path of the invalid item.
    • GitHub PR 4640: System.ArgumentException: Illegal characters in path could prevent successful automatic detection of the Android SDK location during builds in some cases. One possible cause of this issue has now been addressed.
    • GitHub 4790: Starting in Xamarin.Android 10.3, errors similar to error XA3006: Could not compile native assembly file: typemaps.x86.s caused incremental builds to fail after changes to the Supported architectures (AndroidSupportedAbis) in the Advanced section of the Android Options tab in the project property pages.
    • GitHub 4804: Starting in Xamarin.Android 10.3, Failed to parse APK info: failed to parse AndroidManifest.xml, error: %!s() prevented incremental deployments of certain projects that had references to libraries containing AndroidManifest.xml files.
    • Java.Interop GitHub PR 622: warning : Failed to read ... with debugging symbols. Retrying to load it without it. and Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly could appear during builds, for example for projects using obfuscation tools. To align more closely with the behavior of other common .NET project types that do not warn about mismatched debugger symbols, Xamarin.Android projects now log these as informational messages instead of warnings.
    • For Android 11 (API level 30) emulators, failed to install Mono.Android.Platform.ApiLevel_30.apk:Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Scanning Failed.: No signature found in package of version 2 or newer for package Mono.Android.Platform.ApiLevel_30] prevented deploying successfully in the Debug configuration with the shared runtime enabled, which is the recommended default.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.12 runtime and class libraries from Commit 165f4b03 to Commit 83105ba2, adding 21 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    • Developer Community 952568, Mono GitHub 18865: Starting in Xamarin.Android 10.2, SslStream.BeginRead() and SslStream.BeginWrite() would block if called at the same time.
    • GitHub 4713: Starting in Xamarin.Android 10.3, SIGSEGV during monodroid_typemap_java_to_managed could cause apps to abort if the application was built with the AndroidEnablePreloadAssemblies MSBuild property set to false.
    • GitHub 4817: * Assertion at ... mono/mini/method-to-ir.c:12332, condition `var->opcode == OP_REGOFFSET' not met caused apps to abort in the Release configuration when attempting to use the new() type constraint in combination with the XElement type.

    IDE compatibility

    • GitHub 4582: Some Java.Lang.Object properties and methods like Handle and PeerReference appeared in IntelliSense suggestions even though they were primarily intended for use only in generated code.
    • GitHub 4675: The project ... is missing Android SDKs required for building. prevented building without the Android NDK installed for projects with Enable Startup Tracing or AOT Compilation enabled.

    Android API bindings

    • GitHub 4752: error XAGJS7004: System.ArgumentException: Unsupported ForegroundServiceType value '9'. prevented using bitwise combinations of multiple values of Android.Content.PM.ForegroundService.

    Bindings projects

    • GitHub PR 4579: Unrecognized transform root element build error did not yet mention the relevant MSBuild item type.
    • GitHub PR 4579: Specified source jar not found and Specified reference jar not found build errors did not yet mention Java library types other than JAR files.
    • Java.Interop GitHub 515: Bindings projects did not yet have a convenient way to add C# enumerations that did not correspond to Java types.
    • Java.Interop GitHub 588: Warnings similar to warning BG8503: Invalidating Java.Util.IMap and all nested types because some of its methods were invalid. could prevent the bindings generator from providing bindings for interfaces even when the invalid methods were all marked static. Because classes are not required to implement static methods from Java interfaces, the bindings generator now ignores invalid static methods and continues generating bindings for interfaces in these cases.
    • Java.Interop GitHub PR 611: Building a binding project that had a reference to another binding project performed some redundant work for assemblies referenced by both projects.
    • Java.Interop GitHub 631: Xamarin.Android bindings projects did not yet support binding Java methods with more than 14 parameters.
    • Java.Interop GitHub PR 651: Unactionable warning : class-parse: warning: method ... Local variables array has 0 entries ... descriptor has 1 entries! prevented the bindings generator from detecting parameter names for constructor methods marked with the Kotlin @JvmOverloads annotation.

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Versions for continuous build environments

    For users installing Xamarin.Android on macOS continuous build environments, the corresponding version of the Mono Framework MDK to use is Mono Framework MDK 6.12.0.89.

    For special scenarios where users require Xamarin.Android SDK version 11.0.0.3 without any subsequent 11.0 servicing fixes, the fixed-version Visual Studio 2019 version 16.7.0 BuildTools installer can be used on Windows, and the fixed-version .pkg installer package can be used on macOS. The fixed-version .vsix installer package is another alternative for Windows.

    Open source

    Xamarin.Android 11.0 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v11.0.0.3-pre(Jul 14, 2020)

    July 14, 2020 — Xamarin.Android 11.0.0.3 was published as part of Visual Studio 2019 version 16.7 Preview 4 and Visual Studio 2019 for Mac version 8.7 Preview 4.

    Corresponding Visual Studio 2019 Preview release notes

    In Xamarin.Android 11.0.0.3

    Deprecations, removals, and default configuration changes

    Bindings for Android 11 Beta

    This version includes bindings for the Android 11 Beta from Google. See the Android 11 Beta documentation for additional information about the behavior and API changes in this new Android version. Because Android 11 Beta provides the finalized SDK and NDK APIs, the Xamarin.Android bindings are now also finalized and the Xamarin.Android SDK version number has been updated to 11.0. To use the bindings for the new APIs in a Xamarin.Android project, set Compile using Android version: (Target Framework) to Android 11 (R) under the Application tab of the Visual Studio project property pages. This sets the TargetFrameworkVersion property to v11.0 in the .csproj file:

    <TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
    

    Note: The default and recommended Android SDK Build-Tools version for Xamarin.Android is still 29 because Build-Tools version 30.0 currently requires Java JDK 9 or higher, while both Xamarin.Android and Android Studio still require JDK 8. Android SDK Build-Tools 29 is compatible with the Android 11 bindings, so it is recommended to continue using Android SDK Build-Tools 29 for now.

    Attempting to use Android SDK Build-Tools 30.0 with Java JDK 8 results in the following error:

    java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    

    Project authors who wish to try Android SDK Build-Tools 30.0 can follow the steps under Preliminary Java JDK 11 compatibility to install and configure Java JDK 11.

    Bindings projects enumeration enhancements

    The Transforms\EnumFields.xml file in bindings projects now allows <mapping> and <field> elements that use just clr-enum-type and clr-name attributes, with no jni-interface or jni-name attributes. This provides additional flexibility to define custom C# enumerations that are visible to the bindings generation process and do not correspond to any Java type in the bound Java library. For example:

    <mapping clr-enum-type='Contoso.Permissions' bitfield='true'>
      <field clr-name='Read' value='0' />
      <field clr-name='Write' value='1' />
      <field clr-name='Execute' value='2' />
    </mapping>
    

    For enumerations that do correspond to Java types, project authors should continue to include the jni-interface and jni-name attributes as before.

    XA0119 error for incompatible use of Android App Bundle format in Debug configuration

    The Android App Bundle publishing format is not currently compatible with the recommended fast deployment settings for Debug configuration deployments. Previously, projects that had Android Package Format (AndroidPackageFormat) set to aab in the Debug configuration that also had the recommended Use Shared [Mono] Runtime setting enabled would produce a build warning and then fail to launch on device.

    Because this configuration is not currently supported, Xamarin.Android now produces an error for it instead of a warning:

    error XA0119: Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
    

    To resolve this error, change the Android Package Format setting in the Visual Studio project property pages to apk for the Debug configuration. This corresponds to the apk value for the AndroidPackageFormat MSBuild property in the .csproj file:

    <PropertyGroup>
      <AndroidPackageFormat>apk</AndroidPackageFormat>
    </PropertyGroup>
    

    This error is only relevant for Debug configuration builds. Release configuration builds can continue to use the Android App Bundle packaging format.

    AAPT2 version update to 4.0.0

    The version of the Android Asset Packaging Tool AAPT2 included in Xamarin.Android has been updated from 3.5.3 to 4.0.0.

    Issues fixed

    Application behavior on device and emulator

    • Developer Community 970610, Java.Interop GitHub 661: System.TypeLoadException: 'Could not load type 'Android.App.Application.IActivityLifecycleCallbacks' could cause apps using the Android 11 Developer Preview bindings to abort during startup.
    • Developer Community 1045818: Starting in Xamarin.Android 10.3 on Windows, errors similar to Java.Lang.RuntimeException: 'Font asset not found Fonts/fontello.ttf' could cause apps to abort unexpectedly on device after they were updated and redeployed from Visual Studio on Windows.
    • Developer Community 1050379, GitHub 4795: Starting in Xamarin.Android 10.3, Unable to activate instance of type Android.Util.SparseArray`1[E] could cause apps built in the Debug configuration to abort.
    • GitHub 4772, GitHub 4852: System.DllNotFoundException: libmono-native.so assembly:<unknown assembly> type:<unknown type> member:(null) could cause apps to abort during startup on certain Android 5.0 Lollipop (API level 21) and Android 5.1 Lollipop (API level 22) devices.
    • GitHub 4791: Starting in Xamarin.Android 10.3, many typemap: module matching MVID [...] not found. messages were logged to the application output for certain running apps, obscuring other logging statements of interest. These messages were diagnostic and did not indicate problems in the apps.
    • GitHub PR 4792: Starting in Xamarin.Android 10.4.0.0, F/monodroid-assembly(11348): Compressed assembly 'mscorlib.dll' is larger than when the application was built (expected at most 146432, got 2043392). Assemblies don't grow just like that! could appear in application logs in certain cases for apps using the new default managed assembly compression. The problem described by the message could result in other unexpected behaviors in the running app.
    • GitHub 4805: Starting in Xamarin.Android 10.3, localized resources from .resx files in Xamarin.Android application projects were no longer deployed when building and deploying from within Visual Studio to an attached device or emulator. (In contrast, clean builds started on the command line worked as expected.)
    • GitHub 4809: Starting in Xamarin.Android 10.3, System.MemberAccessException: Cannot create an instance of ... could cause apps built in the Debug configuration to abort when attempting to use certain APIs involving types that have both generic and non-generic versions such as Android.Widget.ArrayAdapter.
    • GitHub PR 4846: On Android 11 (API level 30) devices and emulators, java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_30! caused apps to abort during startup for projects with the Target Android version set to API level 30 in the Android Manifest tab of the project property pages.

    Application and library build and deployment

    • Developer Community 1061307 Changes to files set to use the LinkDescription Build Action were not included as expected in incremental builds. Clean rebuilds were required to propagate the changes as expected.
    • Developer Community 1076396: DllImport error loading library '__Internal': 'Could not load library: Library '/system/lib64/libmonodroid.so' not found.' caused apps to abort during startup when built in an unsupported Debug configuration, with Android Package Format set to aab, because the build only provided a warning. The build now produces an error instead.
    • GitHub 4790: Starting in Xamarin.Android 10.3, errors similar to error XA3006: Could not compile native assembly file: typemaps.x86.s caused incremental builds to fail after changes to the Supported architectures (AndroidSupportedAbis) in the Advanced section of the Android Options tab in the project property pages.
    • GitHub 4804: Starting in Xamarin.Android 10.3, Failed to parse APK info: failed to parse AndroidManifest.xml, error: %!s() prevented incremental deployments of certain projects that had references to libraries containing AndroidManifest.xml files.
    • GitHub 4853: Starting in Xamarin.Android 10.4.0.0, error XA0030: Building with JDK version `11.0.7` is not supported. prevented using the latest available OpenJDK 11 version, such as the latest build of the JetBrains Runtime.
    • For Android 11 (API level 30) emulators, failed to install Mono.Android.Platform.ApiLevel_30.apk:Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Scanning Failed.: No signature found in package of version 2 or newer for package Mono.Android.Platform.ApiLevel_30] prevented deploying successfully in the Debug configuration with the shared runtime enabled, which is the recommended default.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.12 runtime and class libraries from Commit 87ef5557 to Commit 83105ba2, adding 6 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    • GitHub 4817: * Assertion at ... mono/mini/method-to-ir.c:12332, condition `var->opcode == OP_REGOFFSET' not met caused apps to abort in the Release configuration when attempting to use the new() type constraint in combination with the XElement type.

    Bindings projects

    • Java.Interop GitHub 515: Bindings projects did not yet have a convenient way to add C# enumerations that did not correspond to Java types.
    • Java.Interop GitHub 588: Warnings similar to warning BG8503: Invalidating Java.Util.IMap and all nested types because some of its methods were invalid. could prevent the bindings generator from providing bindings for interfaces even when the invalid methods were all marked static. Because classes are not required to implement static methods from Java interfaces, the bindings generator now ignores invalid static methods and continues generating bindings for interfaces in these cases.
    • Java.Interop GitHub PR 651: Unactionable warning : class-parse: warning: method ... Local variables array has 0 entries ... descriptor has 1 entries! prevented the bindings generator from detecting parameter names for constructor methods marked with the Kotlin @JvmOverloads annotation.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 11.0 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.4.0.0(Jun 23, 2020)

    June 23, 2020 — Xamarin.Android 10.4.0.0 was published as part of Visual Studio 2019 version 16.7 Preview 3 and Visual Studio 2019 for Mac version 8.7 Preview 3.

    Corresponding Visual Studio 2019 Preview release notes

    In Xamarin.Android 10.4.0.0

    Deprecations, removals, and default configuration changes

    Build and deployment performance

    • GitHub PR 4750: Skip checking for uses of AppDomain.CreateDomain() in assemblies provided by Xamarin.Android. This reduced the time for the LinkAssembliesNoShrink from about 2.6 seconds to about 1.8 seconds for an initial clean build of small Xamarin.Forms test app.

    Smaller app package sizes

    Managed assemblies are now compressed by default for Release configuration builds, resulting in significantly smaller APK and Android App Bundle sizes. Assemblies are compressed with the LZ4 algorithm during builds and then decompressed on device during app startup.

    For a small example Xamarin.Forms application, this reduced the APK size from about 23 megabytes to about 17 megabytes while only increasing the time to display the first page of the app from about 780 milliseconds to about 790 milliseconds.

    If needed, the new behavior can be disabled for a particular project by opening the project file in Visual Studio or another text editor and setting the AndroidEnableAssemblyCompression MSBuild property to false in the .csproj file:

    <PropertyGroup>
      <AndroidEnableAssemblyCompression>false</AndroidEnableAssemblyCompression>
    </PropertyGroup>
    

    Note: This feature is intended to replace the older Bundle assemblies into native code Visual Studio Enterprise feature for purposes of app size savings. The AndroidEnableAssemblyCompression property takes precedence if both features are enabled. Project authors who no longer need the Bundle assemblies into native code feature can now disable it or remove the BundleAssemblies MSBuild property from the .csproj file:

     <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
       <DebugSymbols>True</DebugSymbols>
       <DebugType>portable</DebugType>
       <Optimize>True</Optimize>
       <OutputPath>bin\Release\</OutputPath>
       <DefineConstants>TRACE</DefineConstants>
       <ErrorReport>prompt</ErrorReport>
       <WarningLevel>4</WarningLevel>
       <AndroidManagedSymbols>true</AndroidManagedSymbols>
       <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
       <AndroidLinkMode>SdkOnly</AndroidLinkMode>
       <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
    -  <BundleAssemblies>true</BundleAssemblies>
     </PropertyGroup>
    

    Background information

    For comparison, for the small test Xamarin.Forms application with all target ABIs enabled, the Bundle assemblies into native code feature increases the APK size from about 23 megabytes to about 26 megabytes while increasing the time to display the first page of the app from about 780 milliseconds to about 850 milliseconds.

    If only one target ABI is enabled for the test application, such as arm64-v8a, the Bundle assemblies into native code feature decreases the APK size from around 16 megabytes to around 7.5 megabytes, while the new LZ4 approach decreases the size to around 8 megabytes. Time to display the first page is the same in this case as with all target ABIs enabled.

    The number of target ABIs affects the size comparison because Bundle assemblies into native code uses a separate copy of the compressed assemblies for each ABI, while the new LZ4 approach shares them across all target ABIs.

    Minimum compatible Android version changed back to Android 4.4 KitKat (API level 19)

    The minimum compatible Android version for Xamarin.Android apps has been changed back to Android Android 4.4 KitKat (API level 19) to align more closely with the Xamarin.Forms supported platforms.

    This reverts the change from the previous preview that updated the minimum compatible version to Android 5.0 Lollipop.

    Enumerations for new constants in Android 11 Developer Preview 4

    The preview bindings for Android 11 Developer Preview 4 now provide strongly typed enumerations for new constants that are part of Android 11.

    Preliminary Java JDK 11 compatibility

    Xamarin.Android can now use Java JDK 11 to build libraries and applications.

    JDK 11 is not yet installed or required by default for Xamarin.Android, but the apksigner tool in Android SDK Build-Tools version 30 does require JDK 11, so project authors who are using the preview bindings for Android 11 Developer Preview 4 and want to experiment with setting the AndroidSdkBuildToolsVersion MSBuild property to version 30.0.0 will need to use JDK 11.

    To do so:

    1. Install a distribution of JDK 11 version 11.0.4 or lower, such as JetBrains Runtime jbrsdk build 520.13 or earlier.

    2. On Windows, open Tools > Options in Visual Studio, select the Xamarin > Android Settings node, and set Java Development Kit Location to the root of the JDK 11 installation.

      On macOS, open Visual Studio > Preferences, select the Projects > SDK Locations > Android node, open the Locations tab, and set the Java SDK (JDK) Location to the root of the JDK 11 installation.

      Alternatively, to configure the JDK path per project, open the project file in Visual Studio or another text editor and set the JavaSdkDirectory MSBuild property to the root of the JDK 11 installation. For example:

      <PropertyGroup>
        <JavaSdkDirectory>C:\Program Files\jbrsdk</JavaSdkDirectory>
      </PropertyGroup>
      

    Known Issues

    • GitHub 4789: error XACLP7004: System.ArgumentException: Directory ... obj\Debug\javadocs...' does not appear to be an android doc reference directory. prevents using the JavaSourceJar Build Action in bindings projects.
    • GitHub 4853: error XA0030: Building with JDK version `11.0.7` is not supported. prevents using the latest available OpenJDK 11 version, such as the latest build of the JetBrains Runtime.

    XA1023 warning for upcoming DX DEX compiler deprecation

    Projects that have Dex compiler set to dx in the Visual Studio project property pages will now get a build warning:

    warning XA1023: Using the DX DEX Compiler is deprecated. Please update `$(AndroidDexTool)` to `d8`.
    

    To resolve this warning, set the Dex compiler in the Visual Studio project property pages to d8, or edit the project file in Visual Studio or another text editor and set the AndroidDexTool MSBuild property to d8:

    <PropertyGroup>
      <AndroidDexTool>d8</AndroidDexTool>
    </PropertyGroup>
    

    Background information

    Google has deprecated the DX DEX compiler in favor of the D8 DEX compiler. After February 1, 2021, DX will no longer be a part of the Android SDK or Android Studio. Project authors are encouraged to migrate their projects to D8 at their earliest convenience to prepare for this change.

    Updated XA0113 warning for Google Play submission requirements

    The XA0113 warning has been updated to reflect the current minimum target version of Android 9 (API level 28) for submissions to the Google Play store. The following warning will now appear for projects that have an earlier version set under Compile using Android version: (Target Framework) in the Visual Studio project properties pages:

    warning XA0113: Google Play requires that new applications and updates must use a TargetFrameworkVersion of v9.0 (API level 28) or above. You are currently targeting v8.0 (API level 26).
    

    Mono.Data.Sqlite SQLite version update

    The version of SQLite used by Mono.Data.Sqlite in Xamarin.Android has been updated from 3.31.1 to 3.32.1, bringing in security fixes, improvements, and bug fixes.

    JI_JAVA_HOME environment variable for custom Java JDK paths

    Xamarin.Android will now look for the contents of an environment variable named JI_JAVA_HOME as another way to customize the Java JDK path used during the build. In cases where both the JI_JAVA_HOME environment variable and the JavaSdkDirectory MSBuild property are set to custom values, the MSBuild property takes precedence.

    In general, this environment does not need to be adjusted, but in certain special scenarios, having the option to customize the JDK path via an environment variable might provide useful flexibility.

    Issues fixed

    IDE compatibility

    • Developer Community 1038779: Starting in Visual Studio 2019 version 16.7 Preview 1, Visual Studio would abort unexpectedly when attempting to load or build certain Xamarin.Android projects configured to use AAPT2.

    Application behavior on device and emulator

    • Developer Community 1021788, GitHub 4727: Many typemap: unable to find mapping to a Java type from managed type messages were logged to the application output for running apps, in some cases causing Visual Studio to become unresponsive until the output window caught up. This issue was also fixed in Xamarin.Android 10.3.1.4.
    • Developer Community 1030901, GitHub 4664: Localized resources from .resx files were not deployed when building and deploying from within Visual Studio to an attached device or emulator. (In contrast, clean builds on the command line worked as expected.) This issue was also fixed in Xamarin.Android 10.3.1.4.

    Application and library build and deployment

    • Developer Community 955972 error APT2258: not well-formed (invalid token) prevented using accented characters or other non-ASCII UTF-8 characters in Android layout files that also contained custom views. This issue was also fixed in Xamarin.Android 10.3.1.4.
    • GitHub 4152: Unable to read profile ... The system cannot find the file specified prevented the FinishAotProfiling MSBuild target from completing successfully if the location of adb was not in the PATH environment variable.
    • GitHub 4542: error CS1681: You cannot redefine the global extern alias prevented building app projects successfully if the .csproj file included global in the <Aliases></Aliases> metadata element of a referenced Xamarin.Android class library.
    • GitHub 4662: In projects configured to use the recently added manifestmerger.jar Android manifest merging option, tools:node="remove" did not yet remove AndroidManifest.xml nodes generated by C# attributes in referenced library projects.
    • GitHub PR 4779: error XA1011: Using ProGuard with the D8 DEX compiler is no longer supported. Please update `$(AndroidLinkTool)` to `r8`. did not mention the corresponding term code shrinker that is used in the Visual Studio project property pages and did not mention that AndroidLinkTool is an MSBuild property.

    Android API bindings

    • GitHub 4752: error XAGJS7004: System.ArgumentException: Unsupported ForegroundServiceType value '9'. prevented using bitwise combinations of multiple values of Android.Content.PM.ForegroundService.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.12 runtime and class libraries from Commit 075c3f06 to Commit 87ef5557, adding 5 new commits.

    • GitHub 4713: Starting in Xamarin.Android 10.3, SIGSEGV during monodroid_typemap_java_to_managed could cause apps to abort if the application was built with the AndroidEnablePreloadAssemblies MSBuild property set to false.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 10.4 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.3.99.259(Jun 3, 2020)

    June 2, 2020 — Xamarin.Android 10.3.99.259 was published as part of Visual Studio 2019 version 16.7 Preview 2 and Visual Studio 2019 for Mac version 8.7 Preview 2.

    Corresponding Visual Studio 2019 Preview release notes

    In Xamarin.Android 10.3.99.259

    Deprecations, removals, and default configuration changes

    Minimum compatible Android version now Android 5.0 Lollipop (API level 21)

    The minimum compatible Android version for Xamarin.Android apps is now Android 5.0 Lollipop (API level 21).

    Error XA0001 will now appear for projects that have an earlier target framework version set under Compile using Android version: (Target Framework) in the Visual Studio project properties pages:

    error XA0001: Unsupported or invalid $(TargetFrameworkVersion) value of 'v4.4'. Please update your Project Options.
    

    Simiarly, warning XA4216 will now appear for projects that have an earlier version set for the minSdkVersion in the AndroidManifest.xml file:

    warning XA4216: AndroidManifest.xml //uses-sdk/@android:minSdkVersion '20' is less than API-21, this configuration is not supported.
    

    Background information

    The unmanaged native libraries that are part of Xamarin.Android are now built to target Android 5.0 Lollipop (API level 21), so apps built using this release can abort due to incompatible APIs if run on earlier Android versions.

    Preview bindings for Android 11 Developer Preview 4

    This version includes preview bindings for the fourth Developer Preview of Android 11 from Google. See the Android 11 Developer Preview documentation for additional information about the behavior and API changes in this new Android version. To try the bindings for the new APIs in a Xamarin.Android project, set Compile using Android version: (Target Framework) to Android 10.0.99 (R) under the Application tab of the Visual Studio project property pages. This sets the TargetFrameworkVersion property to v10.0.99 in the .csproj file:

    <TargetFrameworkVersion>v10.0.99</TargetFrameworkVersion>
    

    Bindings projects support for methods with more than 14 parameters

    Xamarin.Android bindings projects now support binding Java methods that have any number of parameters instead of the previous limit of 14.

    D8 and R8 version update to 1.6.82

    The version of the D8 DEX compiler and R8 code shrinker included in Xamarin.Android has been updated from 1.5.68 to 1.6.82.

    bundletool version update to 0.14.0

    The version of the bundletool executable included in Xamarin.Android has been updated from 0.10.2 to 0.14.0, bringing in several improvements and bug fixes.

    ProGuard version update to 6.2.2

    The version of ProGuard included in Xamarin.Android has been updated from 5.3.2 to 6.2.2, bringing in a number of improvements and bug fixes.

    Note: ProGuard is only relevant for projects configured to use the older DX DEX compiler. Project authors are recommended to update to the newer D8 DEX compiler at their earliest convenience.

    Issues fixed

    Application behavior on device and emulator

    • Developer Community 1024028, GitHub 4596, GitHub 4660: In Xamarin.Android 10.3.99.230, System.MemberAccessException: Cannot create an instance of ... could cause apps to abort when attempting to use certain APIs that have both generic and non-generic versions.
    • GitHub 3784, GitHub 4471: An outdated version of the Mono Shared Runtime package was sometimes left on target development devices and emulators after Xamarin.Android version updates. This could result in unexpected behaviors in Debug configuration apps until the old shared runtime was manually uninstalled.
    • GitHub PR 4589: ObjectDisposedException could in theory be thrown during cancellation of AndroidClientHandler requests, depending on the particular timing of cancellation and object disposal. The time window where this can happen is now narrower.

    Application and library build and deployment

    • GitHub PR 4640: System.ArgumentException: Illegal characters in path could prevent successful automatic detection of the Android SDK location during builds in some cases if an AndroidSdkDirectory registry value was set for Xamarin.Android that contained unexpected characters. One possible cause of this issue has now been addressed.

    IDE compatibility

    • GitHub 4675: The project ... is missing Android SDKs required for building. prevented building without the Android NDK installed for projects with Enable Startup Tracing or AOT Compilation enabled.

    Bindings projects

    • Java.Interop GitHub 631: Xamarin.Android bindings projects did not yet support binding Java methods with more than 14 parameters.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 10.4 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.3.1.4(Jun 1, 2020)

    June 2, 2020 — Xamarin.Android 10.3.1.4 was published as part of Visual Studio 2019 for Mac version 8.6.2.

    June 1, 2020 — Xamarin.Android 10.3.1.4 was published as part of Visual Studio 2019 version 16.6.1.

    Issues fixed in Xamarin.Android 10.3.1.4

    Application and library build and deployment

    • Developer Community 955972 Starting in Xamarin.Android 10.3, error APT2258: not well-formed (invalid token) prevented using accented characters or other non-ASCII UTF-8 characters in Android layout files that also contained custom views.
    • Developer Community 955972 Starting in Xamarin.Android 10.3, errors similar to error XARLC7000: System.Xml.XmlException: Invalid character in the given encoding could prevent successful builds for certain project configurations, such as projects located in directory paths that contained accented characters or other non-ASCII UTF-8 characters.

    Application behavior on device and emulator

    • Developer Community 1021788: GitHub 4727: Starting in Xamarin.Android 10.3, many typemap: unable to find mapping to a Java type from managed type messages were logged to the application output for running apps, in some cases causing Visual Studio to become unresponsive until the output window caught up.
    • Developer Community 1030901, GitHub 4664: Starting in Xamarin.Android 10.3, localized resources from .resx files were no longer deployed when building and deploying from within Visual Studio to an attached device or emulator. (In contrast, clean builds started on the command line worked as expected.)

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Versions for continuous build environments

    For users installing Xamarin.Android on macOS continuous build environments, the corresponding version of the Mono Framework MDK to use is Mono Framework MDK 6.10.0.104.

    For special scenarios where project authors require Xamarin.Android SDK version 10.3.1.4 without any subsequent 10.3 servicing fixes, the fixed-version Visual Studio 2019 version 16.6.1 BuildTools installer can be used on Windows and the fixed-version .pkg installer package can be used on macOS. The fixed-version .vsix installer package is another alternative for Windows.

    Open source

    Xamarin.Android 10.3 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.3.99.230(May 19, 2020)

    May 19, 2020 — Xamarin.Android 10.3.99.230 was published as part of Visual Studio 2019 version 16.7 Preview 1 and Visual Studio 2019 for Mac version 8.7 Preview 1.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Deprecations, removals, and default configuration changes

    Build and deployment performance

    • GitHub PR 4190: Switch to running AAPT2 in single-file mode rather than --dir mode. This reduced the total incremental build time from about 16.4 seconds to about 5.5 seconds for a test project when a single Android resource file was changed between builds.
    • Java.Interop GitHub PR 624, Java.Interop GitHub PR 627, Java.Interop GitHub PR 628: Update the CRC-64 algorithm used during builds to take advantage of a more efficient calculation technique. This reduced the total incremental build time from about 8.7 seconds to about 8.5 seconds for a small Xamarin.Forms app when one line of a C# file was changed between builds.

    Mono.Android nullable reference types compatibility

    The Mono.Android assembly has been annotated for compatibility with C# 8.0 nullable reference type checks. Projects can now optionally place code that uses types from Mono.Android in a nullable context to take advantage of additional compiler nullability checks. For example, to enable nullability checks for all code in a project, set the Nullable MSBuild property to enable in the .csproj file:

    <PropertyGroup>
      <Nullable>enable</Nullable>
    </PropertyGroup>
    

    When this property set, the build will emit warnings if any code does not properly account for possible null values passed into or returned from APIs in the Mono.Android assembly.

    See the nullable reference types documentation for more information.

    Note: The majority of Mono.Android, including the nullability annotations, is automatically generated from the Android Java source. The annotations intentionally preserve any upstream bugs in the nullability information provided by the Android source code.

    Tidier IntelliSense suggestions for Java.Lang.Object subclasses

    Java.Lang.Object contains several properties and methods that are required to be public to support Xamarin.Android Java bindings but are not intended to be used in hand-written code. These members are now hidden from IntelliSense, making it easier to find the useful members.

    Example IntelliSense suggestions before and after

    Bindings projects XA4231 and XA4232 warnings for deprecated settings

    XA4231 warning for deprecated jar2xml parser

    Any bindings project that has the AndroidClassParser MSBuild property set to the old jar2xml parser or any other unrecognized value will now get a XA4231 build warning:

    warning XA4231: The Android class parser 'jar2xml' is deprecated and will be removed in a future version of Xamarin.Android. Update the project properties to use 'class-parse' instead.
    

    To resolve this warning, update the Android Class Parser setting in the Visual Studio project property pages or the .jar file parser setting in Visual Studio for Mac to class-parse. This corresponds to the class-parse value for the AndroidClassParser MSBuild property in the .csproj file:

    <PropertyGroup>
      <AndroidClassParser>class-parse</AndroidClassParser>
    </PropertyGroup>
    

    XA4232 warning for deprecated XamarinAndroid code generation target

    Any bindings project that has the AndroidCodegenTarget MSBuild property set to the old XamarinAndroid code generation target or any other unrecognized value will now get a XA4232 build warning:

    warning XA4232: The Android code generation target value 'XamarinAndroid' is deprecated and will be removed in a future version of Xamarin.Android. Update the project properties to use 'XAJavaInterop1'.
    

    To resolve this warning, update the Android Codegen target setting in the Visual Studio project property pages or the Code generation target setting in Visual Studio for Mac to XAJavaInterop1. This corresponds to the XAJavaInterop1 value for the AndroidCodegenTarget MSBuild property in the .csproj file:

    <PropertyGroup>
      <AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
    </PropertyGroup>
    

    Issues fixed in Xamarin.Android 10.3.99.230

    Application and library build and deployment

    • GitHub 2042: The Mono.Android assembly did not yet surface the nullability information provided by the upstream Android source code for use in C# 8.0 nullable contexts.
    • GitHub 4439: Invalid values of the AndroidDexTool MSBuild property produced a misleading error during deployment instead of an error during the build. Invalid values are now ignored and the default D8 DEX tool is used instead.
    • GitHub PR 4578: The source directory is under the output directory. Skip it. build error did not yet mention the relevant MSBuild item type or the current path of the invalid item.
    • Java.Interop GitHub PR 622: warning : Failed to read ... with debugging symbols. Retrying to load it without it. and Mono.Cecil.Cil.SymbolsNotMatchingException: Symbols were found but are not matching the assembly could appear during builds, for example for projects using obfuscation tools. To align more closely with the behavior of other common .NET project types that do not warn about mismatched debugger symbols, Xamarin.Android projects now log these as informational messages instead of warnings.

    Design-time builds

    Bindings projects

    • GitHub PR 4579: Unrecognized transform root element build error did not yet mention the relevant MSBuild item type.
    • GitHub PR 4579: Specified source jar not found and Specified reference jar not found build errors did not yet mention Java library types other than JAR files.
    • Java.Interop GitHub PR 611: Building a binding project that had a reference to another binding project performed some redundant work for assemblies referenced by both projects.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.12 runtime and class libraries from Commit 165f4b03 to Commit 051408e0, adding 5 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    IDE compatibility

    • GitHub 4582: Some Java.Lang.Object properties and methods like Handle and PeerReference appeared in IntelliSense suggestions even though they were primarily intended for use only in generated code.

    Known issues in Xamarin.Android 10.3.99.230

    • Developer Community 1024028, GitHub 4596, GitHub 4660: System.MemberAccessException: Cannot create an instance of ... can cause apps to abort when attempting to use certain APIs that have both generic and non-generic versions. This issue will be resolved in a future preview version.

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 10.4 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.3.1.0(May 19, 2020)

    May 19, 2020 — Xamarin.Android 10.3.1.0 was published as part of Visual Studio 2019 version 16.6 and Visual Studio 2019 for Mac version 8.6.

    Corresponding Visual Studio 2019 release notes

    What's new compared to Xamarin.Android 10.2

    Deprecations, removals, and default configuration changes

    Build and deployment performance

    • GitHub PR 3885: Adjust caching of device information during the build so it covers the case where no device or emulator is found. This reduced the time for the DetectIfAppWasUninstalled task from about 2 seconds to about 0 seconds, bringing the total time down closer to the time for a build where a device or emulator is available.
    • GitHub PR 3999: Allow BuildApk to merge new files into the previous APK instead of generating a new APK from scratch for incremental builds where an Android resource file has changed. This reduced the incremental build time for the BuildApk step from about 4 seconds to about 0.7 seconds for a small test app when one Android resource file was changed between builds.
    • GitHub PR 4158: Update the default order of strategies used to detect installed packages to minimize time for modern devices. This can potentially save about 100 milliseconds for the first deployment of an app after launching Visual Studio.
    • GitHub PR 4215: Remove a redundant call to the ResolveAssemblyReference task during the _ResolveSatellitePaths target. This reduced the total time spent in calls to ResolveAssemblyReference from about 240 milliseconds to about 150 milliseconds for incremental builds of a medium sized project. The same savings also apply to the deployment step, resulting in an approximate combined savings of 180 milliseconds for build and deployment of the test project.
    • GitHub PR 4236: Use a Lazy<T> type to access the NuGet lock file so it is only loaded when needed, and remove some redundant logging messages. This reduced the total time for the ResolveAssemblies task from about 320 milliseconds to about 240 milliseconds for incremental builds of a medium sized project. The same savings also apply to the deployment step, resulting in an approximate combined savings of 160 milliseconds for build and deployment of the test project.
    • GitHub PR 4251: Reuse MemoryStream instances throughout the Xamarin.Android build targets to save on allocations. This reduced the combined time for the _GenerateJavaStubs, _ResolveLibraryProjectImports, and _GeneratePackageManagerJava targets from about 3.3 seconds to about 3.0 seconds for an incremental build of a test app where the MainActivity type was modified between builds.
    • GitHub PR 4260: Remove unneeded calls to string.Format() during the LinkAssembliesNoShrink task. This reduced the time for the task from about 800 milliseconds to about 770 milliseconds for an initial clean build of a small Xamarin.Forms test app.
    • GitHub PR 4268, Java.Interop GitHub PR 570: Implement and switch to a new set of wrapper methods around the Mono.Cecil methods to allow caching the results during the GenerateJavaStubs task. This reduced the time for the task from about 1.4 seconds to about 0.9 seconds for an initial clean build of small test Xamarin.Forms test app.
    • GitHub PR 4303: Replace string interpolation during typemap assembly code generation in GenerateJavaStubs with sequential calls to StreamWriter.Write(). This reduced the total time for GenerateJavaStubs from about 1.3 seconds to about 0.9 seconds for an initial clean build of a small Xamarin.Forms test app.
    • GitHub PR 4308: Skip executing keytool -list during the SignAndroidPackage target. This saved about 200 milliseconds for the SignAndroidPackage target for incremental builds where a new APK was generated, such as after changing an Android resource.
    • GitHub PR 4316: Switch the LinkAssembliesNoShrink task to take advantage of the caching from the new Mono.Cecil wrapper methods introduced in Java.Interop GitHub PR 570. This reduced the time for the task from about 710 milliseconds to about 700 milliseconds for an initial clean build of a small Xamarin.Forms test app.
    • GitHub PR 4320: Update the version of LibZipSharp used by the build tasks to 1.0.10, which switches several byte[] instances to System.Buffers.ArrayPool instances to save on allocations. This reduced the combined time for the ResolveLibraryProjectImports and BuildApk tasks from about 5.3 seconds to about 5.0 seconds for a small test Xamarin.Forms app on an initial clean build.
    • GitHub PR 4395: Remove use of temporary files during the ConvertResourcesCases task. This reduced the time for the task from about 610 milliseconds to about 510 milliseconds for a moderately large real-world project on initial clean builds as well as on incremental builds with Android resource changes.
    • Java.Interop GitHub PR 559: Switch from using Assembly.GetName().Name to using Assembly.FullName combined with string.Substring() in JavaNativeTypeManager.GetPackageName(). This reduced the time for GenerateJavaStubs from about 390 milliseconds to about 360 milliseconds for an initial clean build of a small Xamarin.Forms test app.
    • Java.Interop GitHub PR 577: Change a LINQ expression to a loop in Java.Interop's IsSubclassOf() extension method. This reduced the time for GenerateJavaStubs from about 560 milliseconds to about 540 milliseconds for an initial clean build of a small Xamarin.Forms test app.
    • Java.Interop GitHub PR 596: Use File.Exists() instead of DirectoryGetFile() in a few places. This reduced the time for the LinkAssembliesNoShrink task from about 710 milliseconds to about 430 milliseconds for a small test Xamarin.Forms app on an initial clean build.

    App startup performance

    • GitHub PR 3958: Skip scanning for .exe files during app startup because Xamarin.Android apps only expect .dll assemblies. This reduced the Runtime.init() phase of application startup for a small test app from about 165 milliseconds to about 164 milliseconds on a Google Pixel 3 XL device and from about 530 milliseconds to about 450 milliseconds on an x86 emulator using HAXM.
    • GitHub PR 3992: Optimize the storage format of the per-application Java-to-managed and managed-to-Java type mappings to allow more efficient lookups. This reduced the time to display the first screen of a small test Xamarin.Forms app from about 800 milliseconds to about 790 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • GitHub PR 4302: Avoid unneeded calls to GetCustomAttribute() during app startup for the common case where an app has no types decorated with JniAddNativeMethodRegistrationAttribute. Additionally, instead of using a managed method to propagate uncaught exceptions from Java, use a Java method that calls into the unmanaged Xamarin.Android runtime. These changes reduced the time to display the first screen of a small test Xamarin.Forms app from about 730 milliseconds to about 700 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • Java.Interop GitHub PR 541 Add [MethodImpl (MethodImplOptions.AggressiveInlining)] to Java.Interop methods and properties that are called many times during Xamarin.Forms app startup. This reduced the time to display the first screen of a blank Xamarin.Forms app from about 560 milliseconds to about 540 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • Java.Interop GitHub PR 555: Implement and switch to a new JniTypeManager.GetTypeSignature() method that returns a JniTypeSignature instance instead of an IEnumerable<JniTypeSignature>. This reduced the time to display the first screen of a small test Xamarin.Forms app from about 760 milliseconds to about 750 milliseconds for a Release configuration build on a Google Pixel 3 XL device. It also reduced the number of object allocations from about 9300 to about 8900.
    • Java.Interop GitHub PR 557: Remove unneeded calls to IntrospectionExtensions.GetTypeInfo() now that Java.Interop is a .NET Standard library rather than a PCL. This reduced the time to display the first screen of a small test Xamarin.Forms app from about 755 milliseconds to about 753 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • Java.Interop GitHub PR 574: Skip calling GetCustomAttribute() in cases where JniTypeManager.GetSimpleReference() can be used instead.
    • Java.Interop GitHub PR 582: Remove a static array initialization from JniRuntime and an array iteration during JniRuntime.JniTypeManager.GetTypeSignature(), and leverage Type.GetTypeCode() for faster lookups of builtin types.
    • Mono GitHub PR 19102: Use GArray instead of GList when getting custom attributes from an image. This reduces the number of memory allocations during app startup for a standard Xamarin.Forms app, which should improve startup times by several milliseconds.

    Android resource editing performance

    • GitHub PR 3674: Correct the Inputs for the _ManagedUpdateAndroidResgen target so that the target is skipped as expected during incremental design-time builds.

    Mono Framework version update to 6.12

    Xamarin.Android now uses the Mono 6.12 runtime and class libraries at Commit 165f4b03, bringing in about 900 new commits.

    Preview bindings for Android 11 Developer Preview 2

    This version includes preview bindings for the second Developer Preview of Android 11 from Google. See the Android 11 Developer Preview documentation for additional information about the behavior and API changes in this new Android version. To try the bindings for the new APIs in a Xamarin.Android project, set Compile using Android version: (Target Framework) to Android 10.0.99 (R) under the Application tab of the Visual Studio project property pages. This sets the TargetFrameworkVersion property to v10.0.99 in the .csproj file:

    <TargetFrameworkVersion>v10.0.99</TargetFrameworkVersion>
    

    New features

    These bindings take advantage of C# 8.0's support for default and static interface members to provide C# interface APIs that more closely match the original Android APIs.

    For example, in the Android.Views.TextClassifiers namespace, TextClassifier.HintTextIsEditable is now available as ITextClassifier.HintTextIsEditable, and the old TextClassifier.HintTextIsEditable field is marked [Obsolete].

    Note: An older set of bindings for interface constants were also available in Consts classes like TextClassifierConsts in earlier target framework versions. Those classes were marked [Obsolete] for several years. They have been removed completely for the Android 10.0.99 (R) target framework version. Project authors are encouraged to switch to the new interface members like ITextClassifier.HintTextIsEditable at their earliest convenience.

    R8 configured to suppress common build errors

    Xamarin.Android now configures R8 to skip emitting errors for Java dependency warnings such as:

    R8 : warning : Missing class: org.apache.http.client.methods.HttpEntityEnclosingRequestBase
    R8 : warning : Missing class: java.lang.ClassValue
    R8 : error : Compilation can't be completed because some library classes are missing.
    

    This allows a more gradual transition to R8, particularly for projects that are using R8 for multidex only and not code shrinking.

    Although these R8 warnings will no longer cause the build to fail, project authors are encouraged to address the warnings at their earliest convenience and then set R8 back to its original stricter behavior. To restore the original behavior, set the AndroidR8IgnoreWarnings MSBuild property to false in the .csproj file:

    <PropertyGroup>
      <AndroidR8IgnoreWarnings>false</AndroidR8IgnoreWarnings>
    </PropertyGroup>
    

    Example: How to solve Missing class: org.apache.http.client

    R8 : warning : Missing class: org.apache.http.client.methods.HttpEntityEnclosingRequestBase
    
    Best solution

    Update any NuGet packages or Java dependencies that use the Apache HTTP client to newer versions that use java.net.HttpURLConnection instead. This is the best solution because starting in Android 6.0 Marshmallow (API level 23), the Apache HTTP client is deprecated in favor of the more efficient HttpURLConnection.

    Second-best solution

    If new library versions are not yet available that use HttpURLConnection, then, where possible, update any NuGet packages that use Apache HTTP client to newer versions that include a UsesLibraryAttribute for org.apache.http.legacy:

    [assembly: UsesLibrary("org.apache.http.legacy", false)]
    

    NuGet package authors who cannot yet update all Java dependencies to use HttpURLConnection are encouraged to add this attribute to their projects as soon as possible.

    This attribute automatically generates the following element under the <application> node of AndroidManifest.xml for any app that references the NuGet package:

    <uses-library android:name="org.apache.http.legacy" android:required="false" />
    
    Fallback solution

    If updated NuGet package versions are not yet available with the attribute, then add the same UsesLibraryAttribute directly to the application project instead:

    [assembly: UsesLibrary("org.apache.http.legacy", false)]
    
    Background information

    The Missing class: org.apache.http.client warning indicates that the app has a Java dependency on the Apache HTTP client. Starting in Android 6.0 Marshmallow (API level 23), that client was deprecated and moved out of android.jar into its own org.apache.http.legacy.jar library. As a result, applications that use Apache HTTP client on Android 6.0 or higher will only be able to call the APIs successfully if they declare the use of org.apache.http.legacy via a <uses-library> element in AndroidManifest.xml. Otherwise, the API calls will fail with exceptions similar to:

    Java.Lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/impl/client/DefaultHttpClient
    

    Example: How to solve Missing class: java.lang.ClassValue

    R8 : warning : Missing class: java.lang.ClassValue
    
    Solution

    It is typically safe to suppress this warning:

    1. Add a new text file to the project, named for example proguard-rules.pro.

    2. Set the contents of the file to:

      -dontwarn java.lang.ClassValue
      
    3. Edit the .csproj file in a text editor and add --pg-conf proguard-rules.pro to the AndroidR8ExtraArguments MSBuild property, for example by adding the following lines:

      <PropertyGroup>
        <AndroidR8ExtraArguments>--pg-conf proguard-rules.pro</AndroidR8ExtraArguments>
      </PropertyGroup>
      

      (If the project is configured to use R8 for code shrinking, an easier option is to set the Build Action of proguard-rules.pro to ProguardConfiguration in the Visual Studio Properties window, but that approach is not yet supported when using R8 for multidex only.)

    Background information

    The Missing class: java.lang.ClassValue warning indicates that the app references a library that uses java.lang.ClassValue. Typically this happens when the app references a library that was built to run on multiple Java platforms. On Android, the java.lang.ClassValue type does not exist in the java.lang package.

    One known scenario that produces this warning is when an app references the Xamarin.Firebase.Firestore NuGet package, which depends on the cross-platform Google Guava library. Guava uses java.lang.ClassValue, but it only uses it on platforms where it is available, so it is safe to suppress the Missing class: java.lang.ClassValue warning for that library.

    A future version of the Xamarin.Guava.Google NuGet package will provide the -dontwarn java.lang.ClassValue R8 rule to suppress the warning automatically. In the mean time, application authors can suppress the warning by adding the rule to their app projects directly.

    More thorough clean of obj directory between builds

    In previous versions, Xamarin.Android reserved a costlier, more complete incremental clean of the intermediate output directory for special scenarios where a NuGet package changed or where the AndroidPackageNamingPolicy MSBuild property changed. Xamarin.Android 10.3 expands this behavior to perform the more complete clean for changes to several other MSBuild properties:

    • AndroidAotMode
    • AndroidCreatePackagePerAbi
    • AndroidDexTool
    • AndroidEmbedProfilers
    • AndroidEnableProfiledAot
    • AndroidExplicitCrunch
    • AndroidGenerateJniMarshalMethods
    • AndroidIncludeDebugSymbols
    • AndroidLinkMode
    • AndroidLinkSkip
    • AndroidLinkTool
    • AndroidNdkDirectory
    • AndroidPackageFormat
    • AndroidSdkBuildToolsVersion
    • AndroidSdkDirectory
    • AndroidSequencePointsMode
    • AndroidUseLatestPlatformSdk
    • AndroidUseSharedRuntime
    • AotAssemblies
    • BundleAssemblies
    • EmbedAssembliesIntoApk
    • JavaSdkDirectory
    • MonoSymbolArchive
    • OS
    • TargetFrameworkVersion
    • XamarinAndroidVersion

    This should reduce the number of cases where project authors need to run a full clean by hand after changing one of these properties, such as after updating to a new Xamarin.Android version.

    Changes to these particular properties already triggered additional build steps, so this new behavior should not noticeably increase incremental build times. As in the past, to get the best incremental build times, avoid changing these properties back and forth too much between builds.

    Compatibility with embedded debug information

    The Mono Framework version in this Xamarin.Android version adds compatibility for reading embedded debugging information from assemblies built with Build > Advanced > Debugging information set to Embedded in the Visual Studio project property pages. This corresponds to the embedded value for the DebugType MSBuild property in the .csproj file:

    <PropertyGroup>
      <DebugType>embedded</DebugType>
    </PropertyGroup>
    

    See the symbol embedding design documentation for more information.

    Support for Android App Bundle configuration files

    The Android App Bundle publishing format includes an option to customize certain details about how APKs are generated from the bundle, such as whether or not a separate configuration APK is generated for each set of language resources, screen density resources, and ABI libraries. See the documentation about BundleConfig.json files to learn more. Xamarin.Android now includes an option to pass this kind of configuration file to bundletool during the build process.

    To specify a configuration file, set the AndroidBundleConfigurationFile MSBuild property to the path of the file. For example, add lines similar to the following to the .csproj file:

    <PropertyGroup>
      <AndroidBundleConfigurationFile>BundleConfig.json</AndroidBundleConfigurationFile>
    </PropertyGroup>
    

    Note: Xamarin.Android configures some of the settings automatically, including the list of file extensions to leave uncompressed.

    Stream.Seek() for file streams from Android APIs

    Until now, Stream.Seek() and related properties like Stream.Position always threw NotSupportedException on Stream instances returned from Android API methods. In Xamarin.Android 10.3, Stream.Seek() and the other related properties are now available on these Stream instances when the underlying Java types inherit from FileInputStream.

    Localized errors and warnings for builds

    Many of the errors and warnings in the Xamarin.Android build tasks now provide localized messages that match the region and language settings of the build environment.

    Java.Interop nullable reference types compatibility

    The Java.Interop assembly has been updated for compatibility with C# 8.0 nullable reference type checks. Any projects that are using types directly from the Java.Interop assembly can now optionally place that code in a nullable context to take advantage of additional compiler nullability checks. Most Xamarin.Android projects only use the Java.Interop assembly indirectly, so this change is not relevant for most projects.

    Mono.Data.Sqlite SQLite version update

    The version of SQLite used by Mono.Data.Sqlite in Xamarin.Android has been updated from 3.28.0 to 3.31.1, bringing in security fixes, improvements, and bug fixes.

    Default Android tools versions update to 29.0

    The default Android SDK Build-Tools version has been updated from 28.0.3 to 29.0.2. This version can be changed per-project if needed via the AndroidSdkBuildToolsVersion MSBuild property.

    The default Android SDK Platform-Tools version has been updated from 28.0.0 to 29.0.5. This version can be changed per-project if needed via the AndroidSdkPlatformToolsVersion MSBuild property.

    XA1011 error for D8 with ProGuard

    Any project using the D8 DEX compiler that has either Code shrinker (AndroidLinkTool) set to ProGuard or the older AndroidEnableProguard MSBuild property set to true will now get an XA1011 build error:

    error XA1011: Using ProGuard with the D8 DEX compiler is no longer supported. Please update `$(AndroidLinkTool)` to `r8`.
    

    In the past, this configuration was allowed, but now only the R8 code shrinker is supported for use with the D8 DEX compiler.

    To resolve this error, update the Code shrinker setting in the Visual Studio project property pages to r8. This corresponds to the r8 value for the AndroidLinkTool MSBuild property in the .csproj file:

    <PropertyGroup>
      <AndroidLinkTool>r8</AndroidLinkTool>
    </PropertyGroup>
    

    Note: R8 might in some cases produce new build warnings or errors compared to ProGuard, so the ProGuard rules for the project might require updates after this change.

    XA0122 and CS0618 warnings for deprecated Java.Interop.DoNotPackageAttribute

    Any app project that references a Xamarin.Android bindings library containing uses of Java.Interop.DoNotPackageAttribute will now get a XA0122 build warning:

    warning XA0122: Assembly 'Library1' is using a deprecated attribute '[assembly: Java.Interop.DoNotPackageAttribute]'. Use a newer version of this NuGet package or notify the library author.
    

    Similarly, any library project that includes a use of [assembly: Java.Interop.DoNotPackageAttribute] will now get a CS0618 build warning:

    warning CS0618: 'DoNotPackageAttribute' is obsolete: 'This attribute is deprecated and will be removed in a future release. Use the @(AndroidExternalJavaLibrary) MSBuild item group instead.'
    

    Java.Interop.DoNotPackageAttribute will be removed in a future release. NuGet package authors are encouraged to transition away from it at their earliest convenience. The recommended approach is to include the external library as a separate file within the NuGet package and add a .props file in both the build and buildTransitive directories of the NuGet package that sets the library as a AndroidExternalJavaLibrary item for consuming app projects. For example, if the external library is included alongside the .props file in the build and buildTransitive directories, then the contents of the .props file can be:

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <ItemGroup>
        <AndroidExternalJavaLibrary Include="$(MSBuildThisFileDirectory)*.jar">
      </ItemGroup>
    </Project>
    

    CS0619 error for obsolete constant fields

    Certain previously deprecated constant fields in the Android API bindings have been updated from [Obsolete] to [Obsolete(error:true)]. These types will now produce CS0619 errors instead of CS0618 warnings.

    To resolve these errors, switch to the types mentioned in the error messages. For example, for Android.Content.ComponentCallbacks2.TrimMemoryBackground, the error message is:

    error CS0619: 'ComponentCallbacks2.TrimMemoryBackground' is obsolete: 'This constant will be removed in the future version. Use Android.Content.TrimMemory enum directly instead of this field.'
    

    To resolve this example error, switch the type to Android.Content.TrimMemory.Background.

    Bindings projects exclusion of private nested types

    Previously, Xamarin.Android bindings projects generated public bindings for all nested Java types, even when the types had private or package-private visibility. Bindings projects now respect private visibilities on nested types and no longer generate bindings for those types.

    Note: This change in behavior can result in new C# compiler errors for bindings projects, such as:

    error CS0426: The type name 'AttribOp' does not exist in the type 'CSSParser'
    error CS0115: 'MapControllerOld.HalfCosinusalDeceleratingAnimationRunner.JniPeerMembers': no suitable method found to override
    

    To restore any needed missing types, adjust the visibilities by adding rules similar the following to the Transforms\Metadata.xml file:

    <attr path="/api/package[@name='com.caverock.androidsvg']/class[@name='CSSParser.AttribOp']" name="visibility">public</attr>
    <attr path="/api/package[@name='org.osmdroid.views']/class[@name='MapControllerOld.CosinusalBasedAnimationRunner']" name="visibility">public</attr>
    

    Removal of AndroidExplicitCrunch feature

    In previous Xamarin.Android versions, setting the AndroidExplicitCrunch MSBuild property to true would configure the build to crunch PNG drawable resources using a separate MSBuild task before passing them to AAPT.

    This feature was never compatible with projects configured to use AAPT2 and was automatically disabled in those projects. For projects configured to use the older AAPT tool, this feature could cause builds to rerun AAPT on every build. Due to these limitations, this feature has now been removed from Xamarin.Android. The AndroidExplicitCrunch MSBuild property is now ignored. Project authors who added this property to their .csproj files in the past can now remove it.

    Removal of F# Resource.designer.fs file support

    F# Xamarin.Android projects now generate Resource.designer.cs files instead of Resource.designer.fs files. The recommended way to consume these files is to the install the Xamarin.Android.FSharp.ResourceProvider NuGet package, which surfaces F# types for the content in the .cs file.

    See the DisplayPlatformInfo sample for an example of how to use Xamarin.Android.FSharp.ResourceProvider.

    Note: Xamarin.Android.FSharp.ResourceProvider does not support Resource.designer.cs files located in the intermediate output directory, so generation of resource designer files in the intermediate output directory is now disabled for F# projects.

    Removal of keystore certificate fingerprint from build output

    The performance improvement from GitHub PR 4308 that skips executing keytool -list during the build means that the SHA-1 certificate fingerprint no longer appears in the build output. To determine certificate fingerprints in this version, follow the steps from the Finding your Keystore's Signature guide instead.

    Removal of .exe reference support

    To improve performance, Xamarin.Android no longer probes for .exe files during app startup.

    Projects must now use .dll assemblies for all dependencies. Compatible dependency types include .NET Standard libraries, Xamarin.Android class libraries, Xamarin.Android binding libraries, shared projects, and portable class libraries.

    Background information

    The Xamarin.Android build process has historically used .dll files by default, so this change should only affect dependencies built using other project types or custom build targets.

    Also, the build process has intentionally skipped .exe files when packaging APKs since as far back as Xamarin.Android 9.4, so this new Xamarin.Android 10.3 behavior at run time is unlikely to affect app behavior for project authors upgrading from Xamarin.Android 9.4 or above.

    Issues fixed in Xamarin.Android 10.3.1.0

    Application and library build and deployment

    • Developer Community 861086: Starting in Xamarin.Android 10.1, errors similar to 'fixedsize' is incompatible with attribute ChildLayout (attr) enum prevented building projects successfully if they contained custom attribute names ending with the word Layout.
    • Developer Community 888836: ADB1000: Deployment failed System.ArgumentOutOfRangeException ... Parameter name: length could prevent successful deployment on certain devices.
    • Developer Community 917114: error MSB4018: The "CreateManagedLibraryResourceArchive" task failed unexpectedly ... System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string. caused builds to abort for Xamarin.Android class library projects that included AndroidAsset items with paths outside of the project directory.
    • GitHub 2654: Directory obj\Release\android\assets contains *.dll but no debug symbols file was found. warnings were shown by default in Release configuration builds for apps that referenced libraries without debug symbols. These warnings were often caused by NuGet packages and so could not be resolved by app project authors. These warnings have been demoted to informational messages for now.
    • GitHub 3636: Error inflating class android.support.v7.widget.FitWindowsLinearLayout ---> Java.Lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.FitWindowsLinearLayout" and similar errors could prevent apps built with Code shrinker set to ProGuard or r8 from running successfully unless custom ProGuard rules were added to the project by hand. In Xamarin.Android 10.3, projects configured to use AAPT2 now pass the --proguard option to AAPT2 to generate default ProGuard rules that more closely match the defaults for Android Studio projects, removing the need to add custom rules for common scenarios like the FitWindowsLinearLayout type from the Android Support Library.
    • GitHub 3813: Xamarin.Android did not yet support Android App Bundle configuration files.
    • GitHub PR 4149: The managed linker did not yet consider the Java.Interop.GenericMarshaler namespace for linking when set to link SDK assemblies only.
    • GitHub PR 4214: The ConvertResourcesCases task could leave behind a file in the user's temporary directory after the build.
    • GitHub PR 4340: error XA0031: Java SDK 1.8 or above is required when targeting FrameworkVersion did not yet mention the full MSBuild property name TargetFrameworkVersion.
    • GitHub PR 4357: error XA0003 and error XA0004 messages did not yet mention AndroidManifest.xml or include the full name of the android:versionCode XML attribute.
    • GitHub PR 4378: Misleading error MSB6006: "jarsigner.exe" exited with code 1 or error MSB6006: "java.exe" exited with code 2 was shown if the AndroidKeyStore MSBuild property was true and the AndroidSigningKeyStore property was set to a file that did not exist.
    • GitHub PR 4387: error XA1010: Invalid application placeholders... did not yet mention the associated AndroidManifestPlaceholders MSBuild property or list the current value of the property.
    • GitHub 4409: ; expected prevented using comma-delimited lists in Aliases MSBuild item metadata on Xamarin.Android library project references.
    • GitHub PR 4422: error APT0001: unknown option... was inaccurate for cases where an option was misspelled, and it did not yet mention the relevant MSBuild properties.
    • GitHub PR 4444: System.IO.IOException: The directory is not empty could sometimes prevent the RemoveDirFixed task from removing temporary build directories. The task now produces a warning instead, allowing the build to complete successfully.
    • GitHub 4478, GitHub 4486: On macOS, starting in Xamarin.Android 10.2, [INSTALL_FAILED_INVALID_APK: ... base.apk code is missing] and Module 'base' has no dex files prevented deploying successfully for certain projects configured to use the DX DEX compiler.

    Application behavior on device and emulator

    • GitHub 4110: Unable to get provider mono.MonoRuntimeProvider_1: java.lang.ClassNotFoundException prevented apps containing broadcast receivers from launching successfully if they were built with ProGuard or R8 enabled.

    Application Mono Framework behavior on device and emulator

    Design-time build

    • GitHub 2413: The _ManagedUpdateAndroidResgen target was running during every incremental design-time build.

    Bindings projects

    • GitHub PR 4385: You have Jar libraries, lint.jar, lint.jar, ... that have the identical name with inconsistent file contents could prevent apps from using custom bindings libraries for certain Java libraries. This was discovered while preparing new versions of the Xamarin.AndroidX bindings libraries.
    • Java.Interop GitHub 519: error CS1001: Identifier expected prevented building binding projects for Java libraries that defined classes outside of a Java package.
    • Java.Interop GitHub 565: error CS0103: The name 'p0' does not exist in the current context prevented building bindings projects for Java libraries that contained explicit interface property implementations.
    • Java.Interop GitHub 571: Kotlin: Hiding internal ... method caused missing bindings for public Kotlin methods in cases where the method names were the same as the names of private properties or fields.
    • Java.Interop GitHub 572: Package-private nested types were not automatically excluded from bindings, resulting in errors similar to error: ... is not public in ...; cannot be accessed from outside package when attempting to use the bindings.

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Versions for continuous build environments

    For users installing Xamarin.Android on macOS continuous build environments, the corresponding version of the Mono Framework MDK to use is Mono Framework MDK 6.10.0.104.

    For special scenarios where users require Xamarin.Android SDK version 10.3.1.0 without any subsequent 10.3 servicing fixes, the fixed-version Visual Studio 2019 version 16.6.0 BuildTools installer can be used on Windows, and the fixed-version .pkg installer package can be used on macOS. The fixed-version .vsix installer package is another alternative for Windows.

    Open source

    Xamarin.Android 10.3 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.3.1.0-pre(May 15, 2020)

    May 14, 2020 — Xamarin.Android 10.3.1.0 was published as part of Visual Studio 2019 for Mac version 8.6 Preview 6.

    Corresponding Visual Studio 2019 release notes

    Issues fixed in Xamarin.Android 10.3.1.0

    Application and library build and deployment

    • Developer Community 1024028, GitHub 4596, GitHub 4660: Starting in Xamarin.Android 10.2.100.7, System.MemberAccessException: Cannot create an instance of ... could cause apps to abort when attempting to use certain APIs that have both generic and non-generic versions.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the commercial .pkg installer package can be found in the project README.

    Open source

    Xamarin.Android 10.3 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.3.0.80(May 1, 2020)

    May 7, 2020 — Xamarin.Android 10.3.0.80 was published as part of Visual Studio 2019 for Mac version 8.6 Preview 5

    April 30, 2020 — Xamarin.Android 10.3.0.80 was published as part of Visual Studio 2019 version 16.6 Preview 5

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    This version adds a few more localized warnings and errors for builds to the initial set.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 10.3 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.3.0.74(Apr 16, 2020)

    April 17, 2020 — Xamarin.Android 10.3.0.74 was published to the Preview updater channel of Visual Studio 2019 for Mac version 8.6 Preview 2

    April 16, 2020 — Xamarin.Android 10.3.0.74 was published as part of Visual Studio 2019 version 16.6 Preview 3

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Preview bindings for Android 11 Developer Preview 2

    This version includes preview bindings for the second Developer Preview of Android 11 from Google. See the Android 11 Developer Preview documentation for additional information about the behavior and API changes in this new Android version. To try the bindings for the new APIs in a Xamarin.Android project, set Compile using Android version: (Target Framework) to Android 10.0.99 (R) under the Application tab of the Visual Studio project property pages. This sets the TargetFrameworkVersion property to v10.0.99 in the .csproj file:

    <TargetFrameworkVersion>v10.0.99</TargetFrameworkVersion>
    

    App startup performance

    • Mono GitHub PR 19102: Use GArray instead of GList when getting custom attributes from an image. This reduces the number of memory allocations during app startup for a standard Xamarin.Forms app, which should improve startup times by several milliseconds.

    R8 configured to suppress common build errors

    Xamarin.Android now configures R8 to skip emitting an error for Java dependency warnings such as:

    R8 : warning : Missing class: org.apache.http.client.methods.HttpEntityEnclosingRequestBase
    R8 : warning : Missing class: java.lang.ClassValue
    R8 : error : Compilation can't be completed because some library classes are missing.
    

    This allows a more gradual transition to R8, particularly for projects that are using R8 for multidex only and not code shrinking.

    Although R8 warnings will no longer cause the build to fail, project authors are encouraged to address the warnings at their earliest convenience and then set R8 back to its original stricter behavior. To restore the original behavior, set the AndroidR8IgnoreWarnings MSBuild property to false in the .csproj file:

    <PropertyGroup>
      <AndroidR8IgnoreWarnings>false</AndroidR8IgnoreWarnings>
    </PropertyGroup>
    

    Example: How to solve Missing class: org.apache.http.client

    R8 : warning : Missing class: org.apache.http.client.methods.HttpEntityEnclosingRequestBase
    
    Best solution

    Update any NuGet packages or Java dependencies that use the Apache HTTP client to newer versions that use java.net.HttpURLConnection instead. This is the best solution because starting in Android 6.0 Marshmallow (API level 23), the Apache HTTP client is deprecated in favor of the more efficient HttpURLConnection.

    Second-best solution

    If new library versions are not yet available that use HttpURLConnection, then, where possible, update any NuGet packages that use Apache HTTP client to newer versions that include a UsesLibraryAttribute for org.apache.http.legacy:

    [assembly: UsesLibrary("org.apache.http.legacy", false)]
    

    NuGet package authors who cannot yet update all dependencies to use HttpURLConnection are encouraged to add this attribute to their projects as soon as possible.

    This attribute automatically generates the following element under the <application> node of AndroidManifest.xml for any app that references the NuGet package:

    <uses-library android:name="org.apache.http.legacy" android:required="false" />
    
    Fallback solution

    If updated NuGet package versions are not yet available with the attribute, then add the same UsesLibraryAttribute directly to the application project instead:

    [assembly: UsesLibrary("org.apache.http.legacy", false)]
    
    Background information

    The Missing class: org.apache.http.client warning indicates that the app has a Java dependency on the Apache HTTP client. Starting in Android 6.0 Marshmallow (API level 23), that client was deprecated and moved out of android.jar into its own org.apache.http.legacy.jar library. As a result, applications that use Apache HTTP client on Android 6.0 or higher will only be able to call the APIs successfully if they declare the use of org.apache.http.legacy via a <uses-library> element in AndroidManifest.xml. Otherwise, the API calls will fail with exceptions similar to:

    Java.Lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/impl/client/DefaultHttpClient
    

    Example: How to solve Missing class: java.lang.ClassValue

    R8 : warning : Missing class: java.lang.ClassValue
    
    Solution

    It is typically safe to suppress this warning:

    1. Add a new text file to the project, named for example proguard-rules.pro.

    2. Set the contents of the file to:

      -dontwarn java.lang.ClassValue
      
    3. Edit the .csproj file in a text editor and add --pg-conf proguard-rules.pro to the AndroidR8ExtraArguments MSBuild property, for example by adding the following lines:

      <PropertyGroup>
        <AndroidR8ExtraArguments>--pg-conf proguard-rules.pro</AndroidR8ExtraArguments>
      </PropertyGroup>
      

      (If the project is configured to use R8 for code shrinking, an easier option is to set the Build Action of proguard-rules.pro to ProguardConfiguration in the Visual Studio Properties window, but that approach is not yet supported when using R8 for multidex only.)

    Background information

    The Missing class: java.lang.ClassValue warning indicates that the app references a library that uses java.lang.ClassValue. Typically this happens when the app references a library that was built to run on multiple Java platforms. On Android, the java.lang.ClassValue type does not exist in the java.lang package.

    One known scenario that produces this warning is when an app references the Xamarin.Firebase.Firestore NuGet package, which depends on the cross-platform Google Guava library. Guava uses java.lang.ClassValue, but it only uses it on platforms where it is available, so it is safe to suppress the Missing class: java.lang.ClassValue warning for that library.

    A future version of the Xamarin.Guava.Google NuGet package will provide the -dontwarn java.lang.ClassValue R8 rule to suppress the warning automatically. In the mean time, application authors can suppress the warning by adding the rule to their app projects directly.

    XA1011 error for D8 with ProGuard

    Any project using the D8 DEX compiler that has either Code shrinker (AndroidLinkTool) set to ProGuard or the older AndroidEnableProguard MSBuild property set to true will now get an XA1011 build error:

    error XA1011: Using ProGuard with the D8 DEX compiler is no longer supported. Please update `$(AndroidLinkTool)` to `r8`.
    

    In the past, this configuration was allowed, but now only the R8 code shrinker is supported for use with the D8 DEX compiler.

    To resolve this error, update the Code shrinker setting in the Visual Studio project property pages to r8. This corresponds to the r8 value for the AndroidLinkTool MSBuild property in the .csproj file:

    <PropertyGroup>
      <AndroidLinkTool>r8</AndroidLinkTool>
    </PropertyGroup>
    

    Note: R8 might in some cases produce new build warnings or errors compared to ProGuard, so the ProGuard rules for the project might require updates after this change.

    More aggressive incremental clean of obj directory for certain scenarios

    In previous versions, Xamarin.Android reserved a costlier, more complete incremental clean of the intermediate output directory for special scenarios where a NuGet package changed or where the AndroidPackageNamingPolicy MSBuild property changed. Xamarin.Android 10.3 expands this behavior to cover several other MSBuild properties:

    • AndroidAotMode
    • AndroidCreatePackagePerAbi
    • AndroidDexTool
    • AndroidEmbedProfilers
    • AndroidEnableProfiledAot
    • AndroidExplicitCrunch
    • AndroidGenerateJniMarshalMethods
    • AndroidIncludeDebugSymbols
    • AndroidLinkMode
    • AndroidLinkSkip
    • AndroidLinkTool
    • AndroidNdkDirectory
    • AndroidPackageFormat
    • AndroidSdkBuildToolsVersion
    • AndroidSdkDirectory
    • AndroidSequencePointsMode
    • AndroidUseLatestPlatformSdk
    • AndroidUseSharedRuntime
    • AotAssemblies
    • BundleAssemblies
    • EmbedAssembliesIntoApk
    • JavaSdkDirectory
    • MonoSymbolArchive
    • OS
    • TargetFrameworkVersion
    • XamarinAndroidVersion

    This should reduce the number of cases where project authors need to run a full clean by hand after changing one of these properties, such as after updating to a new Xamarin.Android version.

    Changes to these particular properties already triggered additional build steps, so this new behavior should not noticeably increase incremental build times. As in the past, to get the best incremental build times, avoid changing these properties back and forth too much between builds.

    Issues fixed

    Application and library build and deployment

    • GitHub PR 4382 Starting in Xamarin.Android 10.3.0.33, noisy and redundant errors from jarsigner.jar and apksigner.jar were shown if the AndroidKeyStore MSBuild property was true and the AndroidSigningKeyStore property was set to a file that did not exist.
    • GitHub 4409: ; expected prevented using comma-delimited lists in Aliases MSBuild item metadata on Xamarin.Android library project references.
    • GitHub PR 4422: error APT0001: unknown option... was inaccurate for cases where an option was misspelled, and it did not yet mention the relevant property MSBuild properties.
    • GitHub PR 4444: System.IO.IOException: The directory is not empty could sometimes prevent the RemoveDirFixed task from removing temporary build directories. The task now produces a warning instead, allowing the build to complete successfully.
    • GitHub 4478, GitHub 4486: On macOS, starting in Xamarin.Android 10.2, [INSTALL_FAILED_INVALID_APK: ... base.apk code is missing] and Module 'base' has no dex files prevented deploying successfully for certain projects configured to use the DX DEX compiler.

    Application behavior on device and emulator

    • GitHub 4415: Starting in Xamarin.Android 10.2.100.7, System.NotSupportedException: Cannot create instance of type ... no Java peer type found caused certain apps to crash during launch after incremental deployments.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.12 runtime and class libraries from Commit d90665a4 to Commit 165f4b03, adding 19 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    • Mono GitHub 18917: Explicit implementations of interface properties were ignored if the interfaces provided default implementations.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 10.3 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.3.0.33(Mar 26, 2020)

    March 26, 2020 — Xamarin.Android 10.3.0.33 was published as part of Visual Studio 2019 version 16.6 Preview 2 and to the Preview updater channel of Visual Studio 2019 for Mac version 8.6 Preview 1

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Preview bindings for Android 11 Developer Preview

    This version includes preview bindings for the first Developer Preview of Android 11 from Google. See the Android 11 Developer Preview documentation for additional information about the behavior and API changes in this new Android version. To try the bindings for the new APIs in a Xamarin.Android project, set Compile using Android version: (Target Framework) to Android 10.0.99 (R) under the Application tab of the Visual Studio project property pages. This sets the TargetFrameworkVersion property to v10.0.99 in the .csproj file:

    <TargetFrameworkVersion>v10.0.99</TargetFrameworkVersion>
    

    New features

    These bindings take advantage of C# 8.0's support for default and static interface members to provide C# interface APIs that more closely match the original Android APIs.

    For example, in the Android.Views.TextClassifiers namespace, TextClassifier.HintTextIsEditable is now available as ITextClassifier.HintTextIsEditable, and the old TextClassifier.HintTextIsEditable field is now marked [Obsolete].

    Note: An older set of bindings for interface constants were also available in Consts classes like TextClassifierConsts in earlier target framework versions. Those classes were marked [Obsolete] for several years. They have been removed completely for the Android 10.0.99 (R) target framework version. Project authors are encouraged to switch to the new interface members like ITextClassifier.HintTextIsEditable at their earliest convenience.

    Build and deployment performance

    • GitHub PR 4308: Skip executing keytool -list during the SignAndroidPackage target. This saved about 200 milliseconds for the SignAndroidPackage target for incremental builds where a new APK was generated, such as after changing an Android resource.
    • GitHub PR 4316: Switch the LinkAssembliesNoShrink task to take advantage of the caching from the new Mono.Cecil wrapper methods introduced in Java.Interop GitHub PR 570. This reduced the time for the task from about 710 milliseconds to about 700 milliseconds for an initial clean build of a small Xamarin.Forms test app.
    • GitHub PR 4320: Update the version of LibZipSharp used by the build tasks to 1.0.10, which switches several byte[] instances to System.Buffers.ArrayPool instances to save on allocations. This reduced the combined time for the ResolveLibraryProjectImports and BuildApk tasks from about 5.3 seconds to about 5.0 seconds for a small test Xamarin.Forms app on an initial clean build.
    • GitHub PR 4395: Remove use of temporary files during the ConvertResourcesCases task. This reduced the time for the task from about 610 milliseconds to about 510 milliseconds for a moderately large real-world project on initial clean builds as well as on incremental builds with Android resource changes.
    • Java.Interop GitHub PR 596: Use File.Exists() instead of DirectoryGetFile() in a few places. This reduced the time for the LinkAssembliesNoShrink task from about 710 milliseconds to about 430 milliseconds for a small test Xamarin.Forms app on an initial clean build.

    App startup performance

    • GitHub PR 4302: Avoid unneeded calls to GetCustomAttribute() during app startup for the common case where an app has no types decorated with the [JniAddNativeMethodRegistration] attribute. Additionally, instead of using a managed method to propagate uncaught exceptions from Java, use a Java method that calls into the unmanaged Xamarin.Android runtime. These changes reduced the time to display the first screen of a small test Xamarin.Forms app from about 730 milliseconds to about 700 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • Java.Interop GitHub PR 582: Remove a static array initialization from JniRuntime and an array iteration during JniRuntime.JniTypeManager.GetTypeSignature(), and leverage Type.GetTypeCode() for faster lookups of builtin types.

    Mono Framework version update to 6.12

    Xamarin.Android now uses the Mono 6.12 runtime and class libraries at Commit d90665a4, bringing in about 350 new commits.

    Removal of AndroidExplicitCrunch feature

    In previous Xamarin.Android versions, setting the AndroidExplicitCrunch MSBuild property to true would configure the build to crunch PNG drawable resources using a separate MSBuild task before passing them to AAPT.

    This feature was never compatible with projects configured to use AAPT2 and was automatically disabled in those projects. For projects configured to use the older AAPT tool, this feature could cause builds to rerun AAPT on every build. Due to these limitations, this feature has now been removed from Xamarin.Android. The AndroidExplicitCrunch MSBuild property is now ignored. Project authors who added this property to their .csproj files in the past can now remove it.

    Removal of keystore certificate fingerprint from build output

    The performance improvement that skips executing keytool -list during the build means that the SHA-1 certificate fingerprint no longer appears in the build output. To determine certificate fingerprints in this version, follow the steps from the Finding your Keystore's Signature guide instead.

    Compatibility with embedded debug information

    The Mono Framework version in this Xamarin.Android version adds compatibility for reading embedded debugging information from assemblies built with Build > Advanced > Debugging information set to Embedded in the Visual Studio project property pages. This corresponds to the embedded value for the DebugType MSBuild property in the .csproj file:

    <PropertyGroup>
      <DebugType>embedded</DebugType>
    </PropertyGroup>
    

    See the symbol embedding design documentation for more information.

    Localized warnings and errors for builds

    Many of the warnings and errors in the Xamarin.Android build tasks now provide localized messages that match the region and language settings of the build environment.

    Issues fixed

    Application and library build and deployment

    • Developer Community 861086: Starting in Xamarin.Android 10.1, errors similar to 'fixedsize' is incompatible with attribute ChildLayout (attr) enum prevented building projects successfully if they contained custom attribute names ending with the word Layout.
    • GitHub PR 4340: error XA0031: Java SDK 1.8 or above is required when targeting FrameworkVersion did not yet mention the full MSBuild property name TargetFrameworkVersion.
    • GitHub PR 4357: error XA0003 and error XA0004 messages did not yet mention AndroidManifest.xml or include the full name of the android:versionCode XML attribute.
    • GitHub PR 4378: Misleading error MSB6006: "jarsigner.exe" exited with code 1 or error MSB6006: "java.exe" exited with code 2 was shown if the AndroidKeyStore MSBuild property was true and the AndroidSigningKeyStore property was set to a file that did not exist.
    • GitHub PR 4387: error XA1010: Invalid application placeholders... did not yet mention the associated AndroidManifestPlaceholders MSBuild property or list the current value of the property.

    Application Mono Framework behavior on device and emulator

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Xamarin.Android 10.3 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.2.100.7(Mar 17, 2020)

    March 16, 2020 — Xamarin.Android 10.2.100.7 was published as part of Visual Studio 2019 version 16.6 Preview 1

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Build and deployment performance

    • GitHub PR 3885: Adjust caching of device information during the build so it includes the case where no device or emulator is found. This reduced the time for the DetectIfAppWasUninstalled task from about 2 seconds to about 0 seconds, bringing the total time down closer to the time for a build where a device or emulator is available.
    • GitHub PR 3999: Allow BuildApk to merge new files into the previous APK instead of generating a new APK from scratch for incremental builds where an Android resource file has changed. This reduced the incremental build time for BuildApk step from about 4 seconds to about 0.7 seconds for a small test app when one Android resource file was changed between builds.
    • GitHub PR 4158: Update the default order of strategies used to detect installed packages to minimize time for modern devices. This can potentially save about 100 milliseconds for the first deployment of an app after launching Visual Studio.
    • GitHub PR 4215: Remove a redundant call to the ResolveAssemblyReference task during the _ResolveSatellitePaths target. This reduced the total time spent in calls to ResolveAssemblyReference from about 240 milliseconds to about 150 milliseconds for incremental builds of a medium sized project. The same savings also apply to the deployment step, resulting in an approximate combined savings of 180 milliseconds for build and deployment of the test project.
    • GitHub PR 4236: Use a Lazy<T> type to access the NuGet lock file so it is only loaded when needed, and remove some redundant logging messages. This reduced the total time for the ResolveAssemblies task from about 320 milliseconds to about 240 milliseconds for incremental builds of a medium sized project. The same savings also apply to the deployment step, resulting in an approximate combined savings of 160 milliseconds for build and deployment of the test project.
    • GitHub PR 4251: Reuse MemoryStream instances throughout the Xamarin.Android build targets to save on allocations. This reduced the combined time for the _GenerateJavaStubs, _ResolveLibraryProjectImports, and _GeneratePackageManagerJava targets from about 3.3 seconds to about 3.0 seconds for an incremental build of a test app where the MainActivity type was modified between builds.
    • GitHub PR 4260: Remove unneeded calls to string.Format() during the LinkAssembliesNoShrink task. This reduced the time for the task from about 800 milliseconds to about 770 milliseconds for an initial clean build of a small Xamarin.Forms test app.
    • GitHub PR 4268, Java.Interop GitHub PR 570: Implement and switch to a new set of wrapper methods around the Mono.Cecil methods to allow caching the results during the GenerateJavaStubs task. This reduced the time for the task from about 1.4 seconds to about 0.9 seconds for an initial clean build of small test Xamarin.Forms test app.
    • GitHub PR 4303: Replace string interpolation during typemap assembly code generation in GenerateJavaStubs with sequential calls to StreamWriter.Write(). This reduced the total time for GenerateJavaStubs from about 1.3 seconds to about 0.9 seconds for an initial clean build of a small Xamarin.Forms test app without fast deployment.
    • Java.Interop GitHub PR 559: Switch from using Assembly.GetName().Name to using Assembly.FullName combined with string.Substring() in JavaNativeTypeManager.GetPackageName(). This reduced the time for GenerateJavaStubs from about 390 milliseconds to about 360 milliseconds for an initial clean build of a small Xamarin.Forms test app.
    • Java.Interop GitHub PR 577: Change a LINQ expression to a loop in Java.Interop's IsSubclassOf() extension method. This reduced the time for GenerateJavaStubs from about 560 milliseconds to about 540 milliseconds for an initial clean build of a small Xamarin.Forms test app.

    App startup performance

    • GitHub PR 3958: Skip scanning for .exe files during app startup because Xamarin.Android app only expect .dll assemblies. This reduced the Runtime.init() phase of application startup for a small test app from about 165 milliseconds to about 164 milliseconds on a Google Pixel 3 XL device and from about 530 milliseconds to about 450 milliseconds on an x86 emulator using HAXM.
    • GitHub PR 3992: Optimize the storage format of the per-application Java-to-managed and managed-to-Java type mappings to allow more efficient lookups. This reduced the time to display the first screen of a small test Xamarin.Forms app from about 800 milliseconds to about 790 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • Java.Interop GitHub PR 541 Add [MethodImpl (MethodImplOptions.AggressiveInlining)] to Java.Interop methods and properties that are called many times during Xamarin.Forms app startup. This reduced the time to display the first screen of a blank Xamarin.Forms app from about 560 milliseconds to about 540 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • Java.Interop GitHub PR 555: Implement and switch to a new JniTypeManager.GetTypeSignature() method that returns a JniTypeSignature instance instead of an IEnumerable<JniTypeSignature>. This reduced the time to display the first screen of a small test Xamarin.Forms app from about 760 milliseconds to about 750 milliseconds for a Release configuration build on a Google Pixel 3 XL device. It also reduced the number of object allocations from about 9300 to about 8900.
    • Java.Interop GitHub PR 557: Remove unneeded calls to IntrospectionExtensions.GetTypeInfo() now that Java.Interop is a .NET Standard library rather than a PCL. This reduced the time to display the first screen of a small test Xamarin.Forms app from about 755 milliseconds to about 753 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • Java.Interop GitHub PR 574: Skip calling GetCustomAttribute() in cases where JniTypeManager.GetSimpleReference() can be used instead.

    Android resource editing performance

    • GitHub PR 3674: Correct the Inputs for the _ManagedUpdateAndroidResgen target so that the target is skipped as expected during incremental design-time builds.

    Mono Framework version update to 6.10

    Xamarin.Android now uses the Mono 6.10 runtime and class libraries at Commit fc145be9, bringing in about 500 new commits.

    Bindings projects now exclude private nested types

    Previously, Xamarin.Android bindings projects generated public bindings for all nested Java types, even when the types had private or package-private visibility. Bindings projects now respect private visibilities on nested types and no longer generate bindings for those types.

    Note: This change in behavior can result in new C# compiler errors for bindings projects, such as:

    error CS0426: The type name 'AttribOp' does not exist in the type 'CSSParser'
    error CS0115: 'MapControllerOld.HalfCosinusalDeceleratingAnimationRunner.JniPeerMembers': no suitable method found to override
    

    To restore any needed missing types, adjust the visibilities by adding rules like the following to the Transforms\Metadata.xml file:

    <attr path="/api/package[@name='com.caverock.androidsvg']/class[@name='CSSParser.AttribOp']" name="visibility">public</attr>
    <attr path="/api/package[@name='org.osmdroid.views']/class[@name='MapControllerOld.CosinusalBasedAnimationRunner']" name="visibility">public</attr>
    

    Stream.Seek() for file streams from Android APIs

    Until now, Stream.Seek() and related properties like Stream.Position always threw NotSupportedException on Stream instances returned from Android API methods. In Xamarin.Android 10.3, Stream.Seek() and the other related properties are now available on these Stream instances if the underlying Java types inherit from FileInputStream.

    Default Android tools versions update

    The default Android SDK Build-Tools version has been updated from 28.0.3 to 29.0.2. This version can be changed per-project if needed via the AndroidSdkBuildToolsVersion MSBuild property.

    The default Android SDK Platform-Tools version has been updated from 28.0.0 to 29.0.5. This version can be changed per-project if needed via the AndroidSdkPlatformToolsVersion MSBuild property.

    Support for Android App Bundle configuration files

    The Android App Bundle publishing format includes an option to customize certain details about how APKs are generated from the bundle, such as whether or not a separate configuration APK is generated for each set of language resources, screen density resources, and ABI libraries. See the documentation about BundleConfig.json files to learn more. Xamarin.Android now includes an option to pass this kind of configuration file to bundletool during the build process.

    To specify a configuration file, set the AndroidBundleConfigurationFile MSBuild property to the path of the file. For example, add lines similar to the following to the .csproj file:

    <PropertyGroup>
      <AndroidBundleConfigurationFile>BundleConfig.json</AndroidBundleConfigurationFile>
    </PropertyGroup>
    

    Note: Xamarin.Android configures some of the configuration settings automatically, including the list of file extensions to leave uncompressed.

    Removal of F# Resource.designer.fs file support

    F# Xamarin.Android projects now generate Resource.designer.cs files instead of Resource.designer.fs files. The recommended way to consume these files is to the install the Xamarin.Android.FSharp.ResourceProvider NuGet package, which surfaces F# types for the content in the .cs file.

    See the DisplayPlatformInfo sample for an example of how to use Xamarin.Android.FSharp.ResourceProvider.

    Note: Xamarin.Android.FSharp.ResourceProvider does not support Resource.designer.cs files located in the intermediate output directory, so generation of resource designer files in the intermediate output directory is now disabled for F# projects.

    Removal of .exe reference support

    To improve performance, Xamarin.Android no longer probes for .exe files during app startup.

    Projects must now use .dll assemblies for all dependencies. Compatible options include .NET Standard libraries, Xamarin.Android class libraries, Xamarin.Android binding libraries, shared projects, and portable class libraries.

    The Xamarin.Android build process has historically used .dll files by default, so this change should only affect dependencies built using other project types or custom build targets.

    Background info

    As far back as Xamarin.Android 9.4, the Xamarin.Android build process already skipped over .exe files when packaging APKs, so this new Xamarin.Android 10.3 behavior at run time is unlikely to affect app behavior for project authors upgrading from Xamarin.Android 9.4 or above.

    CS0619 error for deprecated constant fields

    Certain deprecated constant fields in the Android API bindings have been updated from [Obsolete] to [Obsolete(error:true)]. These types will now produce CS0619 errors instead of CS0618 warnings.

    To resolve these errors, switch to the types mentioned in the error messages. For example, for Android.Content.ComponentCallbacks2.TrimMemoryBackground, the error message is:

    error CS0619: 'ComponentCallbacks2.TrimMemoryBackground' is obsolete: 'This constant will be removed in the future version. Use Android.Content.TrimMemory enum directly instead of this field.'
    

    To resolve this example error, switch the type to Android.Content.TrimMemory.Background.

    XA0122 and CS0618 warnings for deprecated Java.Interop.DoNotPackageAttribute

    Any app project that references a Xamarin.Android bindings library containing uses of Java.Interop.DoNotPackageAttribute will now get a XA0122 build warning:

    warning XA0122: Assembly 'Library1' is using a deprecated attribute '[assembly: Java.Interop.DoNotPackageAttribute]'. Use a newer version of this NuGet package or notify the library author.
    

    Similarly, any library project that includes a use of [assembly: Java.Interop.DoNotPackageAttribute] will now get a CS0618 build warning:

    warning CS0618: 'DoNotPackageAttribute' is obsolete: 'This attribute is deprecated and will be removed in a future release. Use the @(AndroidExternalJavaLibrary) MSBuild item group instead.'
    

    Java.Interop.DoNotPackageAttribute will be removed in a future release. Library project authors are encouraged to transition away from it at their earliest convenience, and app project authors are encouraged to update to the new library versions when they become available.

    Mono.Data.Sqlite SQLite version update

    The version of SQLite used by Mono.Data.Sqlite in Xamarin.Android has been updated from 3.28.0 to 3.31.1, bringing in security fixes, improvements, and bug fixes.

    Java.Interop nullable reference types compatibility

    The Java.Interop assembly has been updated for compatibility with C# 8.0 nullable reference type checks. Any projects that are using types directly from the Java.Interop assembly can now optionally place that code in a nullable context to take advantage of additional compiler nullability checks. Most Xamarin.Android projects only use the Java.Interop assembly indirectly, so this change is not relevant for most projects.

    Issues fixed in Xamarin.Android 10.2.100.7

    Application and library build and deployment

    • Developer Community 888836: ADB1000: Deployment failed System.ArgumentOutOfRangeException ... Parameter name: length could prevent successful deployment on certain devices.
    • Developer Community 917114: error MSB4018: The "CreateManagedLibraryResourceArchive" task failed unexpectedly ... System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string. caused builds to abort for Xamarin.Android class library projects that included AndroidAsset items with paths outside of the project directory.
    • GitHub 2654: Directory obj\Release\android\assets contains *.dll but no debug symbols file was found. warnings were shown by default in Release configuration builds for apps that referenced libraries without debug symbols. These warnings were often caused by NuGet packages and so could not be resolved by app project authors. These warnings have been downgraded to informational messages for now.
    • GitHub 3636: Error inflating class android.support.v7.widget.FitWindowsLinearLayout ---> Java.Lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.FitWindowsLinearLayout" and similar errors could prevent apps built with Code shrinker set to ProGuard or r8 from running successfully unless custom ProGuard rules were added to the project by hand. In Xamarin.Android 10.3, projects configured to use AAPT2 now pass the --proguard option to AAPT2 to generate default ProGuard rules that more closely match the defaults for Android Studio projects, removing the need to add custom rules for common scenarios like the FitWindowsLinearLayout type from the Android Support Library.
    • GitHub 3813: Xamarin.Android did not yet support Android App Bundle configuration files.
    • GitHub PR 4149: The managed linker did not yet consider the Java.Interop.GenericMarshaler namespace for linking when set to link SDK assemblies only.
    • GitHub PR 4214: The ConvertResourcesCases task could leave behind a file in the user's temporary directory after the build.

    Bindings projects

    • GitHub PR 4385: You have Jar libraries, lint.jar, lint.jar, ... that have the identical name with inconsistent file contents build error could prevent apps from consuming custom bindings libraries for certain Java libraries. This was discovered while preparing new versions of the Xamarin.AndroidX bindings libraries.
    • Java.Interop GitHub 519: error CS1001: Identifier expected caused bindings projects to fail to build for Java libraries that defined any classes outside of a Java package.
    • Java.Interop GitHub 565: error CS0103: The name 'p0' does not exist in the current context caused bindings projects to fail to build for Java libraries that contained explicit interface property implementations.
    • Java.Interop GitHub 571: Kotlin: Hiding internal ... method resulted in missing bindings for public Kotlin methods in cases where the method names were the same as the names of private properties or fields.
    • Java.Interop GitHub 572: Package-private nested types were not automatically excluded from bindings, resulting in errors similar to error: ... is not public in ...; cannot be accessed from outside package when attempting to use the bindings.

    Application behavior on device and emulator

    • GitHub 4110: Unable to get provider mono.MonoRuntimeProvider_1: java.lang.ClassNotFoundException prevented apps containing broadcast receivers from launching successfully if they were built with ProGuard or R8 enabled.

    Design-time build

    • GitHub 2413: The _ManagedUpdateAndroidResgen target was running during every incremental design-time build.

    Known issues

    • GitHub 4415: Cannot create instance of type ... no Java peer type found causes certain apps to crash during launch after incremental deployments.

      Temporary workaround: Clean the project between deployments.

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix installer package can be found in the project README.

    Open source

    Xamarin.Android 10.3 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.2.0.100(Mar 17, 2020)

    March 23, 2020 — Xamarin.Android 10.2.0.100 was released to the Stable updater channel of Visual Studio 2019 for Mac version 8.5.

    March 16, 2020 — Xamarin.Android 10.2.0.100 was released as part of Visual Studio 2019 version 16.5.

    Corresponding Visual Studio 2019 release notes

    What's new compared to Xamarin.Android 10.1

    Important: The names for generated Java types are different in this release. Any project that explicitly uses one of the old names that starts with md5 will need to be updated by hand to account for this change. See Breaking change for generated Java type names below for more details.

    Important: The default multidex tool is now R8 instead of DX. R8 performs additional Java dependency checks that can result in new build warnings and errors like:

    R8 : error : Compilation can't be completed because some library classes are missing.
    

    See D8 enabled by default for all projects below for more details

    Breaking change for generated Java type names

    The fallback option in Xamarin.Android 10.1 that allowed using the old style of generated Java type names that started with md5 has now been removed.

    Authors of projects that include literal uses of generated Java type names that start with md5 will now need to transition to alternatives like the [Register] attribute and the [Activity] attribute.

    Projects that have the LowercaseMD5 fallback option set in the $(AndroidPackageNamingPolicy) MSBuild property will now fail to build with the following error:

    error XAGJS7015: System.NotSupportedException: PackageNamingPolicy.LowercaseHash is no longer supported.
    

    To resolve the error, remove the section for the $(AndroidPackageNamingPolicy) property from the .csproj file:

    <PropertyGroup>
      <AndroidPackageNamingPolicy>LowercaseMD5</AndroidPackageNamingPolicy>
    </PropertyGroup>
    

    See the Xamarin.Android 10.1 release notes for additional background information about this change and examples of how to update existing projects.

    D8 enabled by default for all projects

    Xamarin.Android has included an option to use the D8 DEX compiler since Xamarin.Android 9.2, but is has so far been disabled by default to provide a gradual path for finding and addressing compatibility issues. Starting in Xamarin.Android 10.2, the D8 DEX compiler option is now enabled by default for both existing and new projects.

    To switch back from D8 to the earlier DX compiler for a particular project, set the Dex compiler option in the Visual Studio project property pages first to d8 and then to dx and save the changes, or set the $(AndroidDexTool) MSBuild property to dx by hand in the .csproj file:

    <PropertyGroup>
      <AndroidDexTool>dx</AndroidDexTool>
    </PropertyGroup>
    

    Important: Because the default DEX compiler is now D8, the default multidex tool is now R8 instead of DX. R8 performs additional Java dependency checks that can result in new build warnings and errors like:

    R8 : error : Compilation can't be completed because some library classes are missing.
    

    If needed, these errors can be suppressed temporarily by configuring R8 to be less strict:

    1. Add a new text file to the project, named for example proguard-rules.pro.

    2. Set the contents of the file to:

      -ignorewarnings
      
    3. Edit the .csproj file in a text editor and add --pg-conf proguard-rules.pro to the $(AndroidR8ExtraArguments) MSBuild property, for example by adding the following lines:

      <PropertyGroup>
        <AndroidR8ExtraArguments>--pg-conf proguard-rules.pro</AndroidR8ExtraArguments>
      </PropertyGroup>
      

    AndroidEnableDesugar now requires D8

    Xamarin.Android now always use the D8 DEX compiler for projects that have the $(AndroidEnableDesugar) MSBuild property set to true:

    <PropertyGroup>
      <AndroidEnableDesugar>true</AndroidEnableDesugar>
    </PropertyGroup>
    

    Similarly, Xamarin.Android now always uses the R8 code shrinker for projects that have $(AndroidEnableDesugar) set to true and that have the Code shrinker ($(AndroidLinkTool)) set to ProGuard or r8.

    Note: $(AndroidEnableDesugar) does not correspond to any setting in the project properties pages in Visual Studio, so this change only affects project authors who have added the property to .csproj files by hand.

    Background information

    This change allows Xamarin.Android to remove support for the old desugar_deploy.jar mechanism from the Android Jack toolchain that was deprecated in 2017.

    Mono Framework version update to 6.8

    Xamarin.Android now uses the Mono 6.8 runtime and class libraries at Commit c0c5c78e, bringing in about 800 new commits.

    Build and deployment performance

    • GitHub PR 3692: For the specific scenario of Debug builds that have Use Fast Deployment enabled, undo part of the change from GitHub PR 2718 so that type mappings are parsed at run time instead of being compiled into unmanaged native shared libraries. This reduced the time for the GenerateJavaStubs task from about 540 milliseconds to about 320 milliseconds for an incremental build of a test app where the MainActivity type was modified between builds. As expected, this did increase the app startup time from about 1.30 seconds to about 1.35 seconds, but that still left an overall savings of approximately 170 milliseconds.
    • GitHub PR 3856: Add a fallback naming scheme for the files that mark whether the outputs of the _CompileAndroidLibraryResources target are up-to-date with the input files. This allows projects that use a google-services.json item and that are configured to use AAPT2 to skip the _CompileAndroidLibraryResources target correctly during incremental builds.
    • GitHub PR 3907: Adjust GenerateResourceDesigner to use System.Reflection.Metadata rather than Cecil, use loops instead of LINQ expressions, and skip over .NET Standard libraries. This reduced the time for the GenerateResourceDesigner task during an incremental build from about 470 milliseconds to about 370 milliseconds for a small app on a test system.
    • GitHub PR 4020: Skip a managed linker step for assemblies that have no references to Java.Lang.Object, such as .NET Standard libraries. This reduced the time for the _LinkAssembliesNoShrink target on a test system from about 160 milliseconds to about 50 milliseconds for an incremental build after a one-line change to the MainActivity class.
    • Mono GitHub PR 17898: Skip over unnecessary DNS lookups for the IP address of the target Android device or emulator when starting the debugger.

    App startup performance

    • GitHub PR 3729: Initialize application logging and uncaught exception handling lazily. This reduced the time to display the first screen of a small test Xamarin.Forms app from about 780 milliseconds to about 750 milliseconds for a Release configuration build on a Google Pixel 3 XL device.
    • GitHub PR 3780: Simplify how Android system properties are looked up for internal uses within the Xamarin.Android runtime. This subtracted about 1 millisecond from the total app startup time.
    • GitHub PR 3951: Avoid searching for unmanaged compiled assemblies generated by Enable Startup Tracing or AOT Compilation unless the app was built with one of those options enabled. This reduced the Runtime.init() phase of application startup for a small test app from about 172 milliseconds to about 168 milliseconds.

    Android resource editing performance

    • GitHub PR 3889: Update the _GeneratePackageManagerJavaForDesigner target to check the timestamp of the MonoPackageManager_Resources.java output file instead of the old obsolete MonoPackageManager.java file that was used in Xamarin.Android 9.3 and earlier. This reduced the total time for the SetupDependenciesForDesigner target by about 500 milliseconds for a small app on a test system. The SetupDependenciesForDesigner target runs in the background for interactive scenarios in Visual Studio after an Android resource has changed.
    • GitHub PR 3891: Avoid unnecessary changes to the build.props intermediate file during design-time builds so that the UpdateGeneratedFiles and SetupDependenciesForDesigner targets can skip the _ResolveLibraryProjectImports target. This reduced the time for the UpdateGeneratedFiles target by about 300 milliseconds for a small app on a test system. The UpdateGeneratedFiles target runs in the foreground each time an Android resource is saved, so this makes Visual Studio more responsive when working on Android resources.
    • GitHub PR 3907: Adjust GenerateResourceDesigner to use System.Reflection.Metadata rather than Cecil, use loops instead of LINQ expressions, and skip over .NET Standard libraries. This reduced the time for the GenerateResourceDesigner task during an incremental build from about 470 milliseconds to about 370 milliseconds for a small app on a test system. The GenerateResourceDesigner task also runs in the foreground each time an Android resource is saved, so this makes Visual Studio more responsive when working on Android resources.
    • GitHub PR 3913: Skip the _GenerateJavaStubs target for builds where only Android resources have changed. This makes Visual Studio more responsive when working with Android resources. For example, it reduced the design-time build by about 400 milliseconds for a scenario where an Android resource was edited and saved in a moderately large app on a test system.

    Improved Android manifest merging

    Xamarin.Android now includes an option to use the same Android manifest merger tool that Android Studio uses to merge AndroidManifest.xml files. This provides new capabilities and improves compatibility with Android Studio. See the documentation for details about the available merge rules.

    To enable the new behavior for a project, set the $(AndroidManifestMerger) MSBuild property to manifestmerger.jar in the .csproj file:

    <PropertyGroup>
      <AndroidManifestMerger>manifestmerger.jar</AndroidManifestMerger>
    </PropertyGroup>
    

    Any project authors who were previously using the Xamarin.Android.ManifestMerger NuGet package can remove that package after adding this setting.

    Custom profiles for Enable Startup Tracing

    The Enable Startup Tracing feature compiles a set of managed methods to unmanaged code to improve startup times. By default, only the common methods used during the startup of a basic Xamarin.Android app are compiled. For some apps, this default might not provide the optimum trade-offs between app size and startup times.

    Xamarin.Android 10.2 includes new MSBuild targets to help create custom startup tracing profiles based on the actual methods that a particular app calls during startup.

    Visual Studio integration for this feature is planned for a future release. Project authors who would like to try the feature before then can use command line steps similar to the following:

    1. Ensure only one Android device is attached.

    2. Under the app's Android Manifest > Required permissions in the Visual Studio project property pages, ensure the INTERNET permission is enabled.

    3. Open a Tools > Command Line > Developer Command Prompt.

    4. Run the following command from the app's solution directory:

      msbuild -restore -p:Configuration=Release -t:BuildAndStartAotProfiling
      
    5. Wait for the app's first screen to appear.

    6. Run the following two commands:

      set PATH=%PATH%;"C:\Program Files (x86)\Android\android-sdk\platform-tools"
      
      msbuild -t:FinishAotProfiling
      
    7. Add the following lines to the Android app project .csproj file:

      <ItemGroup>
        <AndroidAotProfile Include="custom.aprof" />
      </ItemGroup>
      <PropertyGroup>
        <AndroidUseDefaultAotProfile>false</AndroidUseDefaultAotProfile>
      </PropertyGroup>
      

    Known issues

    • GitHub 4152: Unable to read profile ... The system cannot find the file specified prevents FinishAotProfiling from completing successfully if the location of adb is not in the current PATH environment variable.
    • GitHub 4402: The first screen of the app never appears and Unable to read profile ... System.IO.IOException: Input file is too small prevents FinishAotProfiling from completing successfully if the INTERNET permission is not enabled for the app.

    Bindings projects support for Kotlin libraries

    This release adds better support for creating bindings for Kotlin libraries, including:

    • Hiding Kotlin internal types and members
    • Using Kotlin provided metadata to properly name method parameters
    • Hiding Kotlin generated methods like foo-impl that aren't intended for public use
    • Restoring Kotlin-mangled method names to their original names, such as changing foo-V5j3Lk8 back to foo
    • Adding support for Kotlin's native unsigned types (UInt, ULong, UShort, UByte)

    Although it was technically possible to bind a Kotlin library previously, these changes greatly reduce the number of custom rules needed in the Transforms\Metadata.xml file to produce expected bindings.

    No additional steps are needed to enable this. The binding process will detect if a .jar file was produced from Kotlin and will apply the needed fixes.

    Important: Some of these changes required adding new APIs to Java.Interop.dll. This means that like the binding projects themselves, Xamarin.Android application projects that consume one of these new Kotlin library bindings must also be built using Xamarin.Android 10.2 or higher.

    Android App Bundle publishing format workflow improvements

    Xamarin.Android 10.2 adds two improvements to the support for Android App Bundle publishing format to align it more closely with the support for the APK publishing format.

    The first change is that the Xamarin.Android MSBuild targets now copy the unsigned .aab file to the output directory. Previously, only the signed .aab file was copied to the output directory. The unsigned file can be useful in continuous integration environments where project authors might want to create an unsigned .aab file via the PackageForAndroid MSBuild target that can then be signed in a separate step.

    This change resolve the following issue:

    • GitHub 3804: Building the PackageForAndroid target, for example by running msbuild -restore -p:Configuration=Release -t:PackageForAndroid, does not output an unsigned .aab file to the output path in projects configured to use the Android App Bundle publishing format.

    The second change is that the directory name for the mono-symbolicate .pdb symbol file archive now ends with the expected .aab.mSYM extension instead of .apk.mSYM.

    Managed TLS 1.0 setting now uses Native TLS 1.2+

    The Managed TLS 1.0 setting for SSL/TLS implementation in the Visual Studio property pages now uses the same TLS implementation as the Native TLS 1.2+ setting. The legacy managed TLS implementation is no longer available.

    New build errors and warnings XA0121, XA2000, XA2001

    XA0121 error for old Xamarin.Android.Support library versions

    The XA0121 warning from Xamarin.Android 10.1 is now an error because compatibility with the old GetAdditionalResourcesFromAssemblies MSBuild task has been removed.

    Any project that uses one of the affected Xamarin.Android.Support libraries from version 26 or earlier will now see errors like:

    error XA0121: Assembly 'Xamarin.Android.Support.Animated.Vector.Drawable' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.
    

    To resolve these errors, update the project to use version 27 or higher of the Xamarin.Android.Support libraries.

    XA2000 warning for use of AppDomain.CreateDomain()

    The new XA2000 build warning identifies cases where projects are using the AppDomain.CreateDomain() API:

    warning XA2000: Use of AppDomain.CreateDomain() detected in assembly: AndroidApp1. .NET 5 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 5 is released.
    

    Because AppDomain in .NET 5 will follow the .NET Core semantics, where there is only exactly one AppDomain and AppDomain.CreateDomain() throws PlatformNotSupportedException, any projects currently using AppDomain.CreateDomain() will need to switch to a different API like AssemblyLoadContext. Project authors are encouraged to begin this transition as soon as they can to prepare for the behavior change.

    XA2001 error for nonexistent Android resources

    Xamarin.Android 10.2 adds a new XA2001 build error to identify cases where projects might unintentionally include references to Android resource file paths that do not exist. Example:

    error XA2001: Source file 'Resources\layout\missing.xml' could not be found.
    

    Before this change, projects that included references to nonexistent Android resources would rebuild the _CompileResources and _UpdateAndroidResgen targets on every build. The new error protects against this by ensuring that project authors remove references to nonexistent resources.

    AAPT2 version update to 3.5.0-5435860

    The version of the Android Asset Packaging Tool AAPT2 included in Xamarin.Android has been updated from 3.4.1-5326820 to 3.5.0-5435860.

    Mono debugger and compiler option passthroughs

    Mono debugger loglevel passthrough

    The Mono soft debugger agent has an option to change the level of diagnostic information it logs. In the past, this log level was always 0 for Xamarin.Android apps. In Xamarin.Android 10.2, the log level can now be adjusted by setting the debugger-log-level option in the debug.mono.log Android system property. For example, the following command sets the log level to 10:

    adb shell setprop debug.mono.log debugger-log-level=10
    

    Mono compiler option passthrough

    The new $(AndroidExtraAotOptions) MSBuild property allows passing options to the Mono compiler in projects that have either Enable Startup Tracing or AOT Compilation enabled.

    In general, this property should be left blank, but in certain special scenarios it might provide useful flexibility.

    Note that this property is different from the related $(AndroidAotAdditionalArguments) property. That property places comma-separated arguments into the --aot option of the Mono compiler. $(AndroidExtraAotOptions) instead passes full standalone space-separated options like --verbose or --debug to the compiler.

    An example use would be to set the --verbose option to get additional diagnostic information during a command line build:

    msbuild -p:AndroidExtraAotOptions=verbose
    

    Issues fixed

    Application and library build and deployment

    • Developer Community 797093, GitHub PR 3945: Starting in Xamarin.Android 10.1, warning XA5302: Two processes may be building this project at once. Lock file exists at path: ... obj\Debug\100\.__lock often appeared unnecessarily when deploying to an emulator or device from within Visual Studio.
    • Developer Community 854863: More than one device connected, please provide --device-id could prevent deploying successfully in projects configured to use the Android App Bundle publishing format when more than one device or emulator was attached.
    • Developer Community 869165: error CS0234: The type or namespace name 'CodeDom' does not exist in the namespace prevented building successfully in projects that used the word System as a dotted part of the default namespace for the project.
    • GitHub 1335: Xamarin.Android did not yet have a standardized way to override AndroidManifest.xml permissions brought in by library references.
    • GitHub 2687, GitHub 3428: Xamarin.Android did not yet provide an option to use the AndroidManifest.xml merge tool that Android Studio uses.
    • GitHub PR 3410: Messages similar to resources.arsc in APK 'android.jar' is compressed were incorrectly surfaced as build errors rather than warnings.
    • GitHub 3423: A misleading The "FilterAssemblies" task failed unexpectedly build error was shown instead of the expected Metadata file ... could not be found error when an app project referenced a .NET Standard library that did not build successfully.
    • GitHub 3622: Warnings similar to R8 : warning : Resource 'META-INF/MANIFEST.MF' already exists. could appear in the Error List window when building apps in the Release configuration with Code shrinker set to r8. These warnings from the upstream R8 tool are not currently relevant for Xamarin.Android users, so Xamarin.Android 10.2 now logs them as plain messages instead of warnings.
    • GitHub 3727: Device could not find component named: ... MainActivity ... The application could not be started. prevented launching an app successfully if the app had been uninstalled by hand between two Debug deployments.
    • GitHub 3804: Building the PackageForAndroid target, for example by running msbuild -restore -p:Configuration=Release -t:PackageForAndroid, did not output an unsigned .aab file to the output path in projects configured to use the Android App Bundle publishing format.
    • GitHub 3808: The type or namespace name ... could not be found in the global namespace prevented using %(Aliases) MSBuild item metadata on Xamarin.Android library project references.
    • GitHub 3849: warning XA0107: Ignoring as it is a Reference Assembly could appear without any mention of the name of the problematic assembly.
    • GitHub 3852: The LinkAssemblies task could get stuck in an infinite loop in projects referencing certain libraries when the $(Nullable) MSBuild property was set to enable.
    • GitHub 3898, GitHub 3920: If a NuGet package included a library without a [assembly: ReferenceAssemblyAttribute] attribute under a ref directory, then Xamarin.Android apps could unexpectedly use that ref version of the library instead of the expected version from the appropriate lib directory.
    • GitHub 3911: The managed linker did not yet remove the custom attribute metadata that C# 8.0 nullable reference types use. That metadata is only needed at build time.
    • GitHub PR 3937: message ANDKT0000: Warning: The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format could appear in the diagnostic Xamarin.Android build output from Java's keytool.exe because Xamarin.Android did not yet specify a -storetype argument to keytool.exe when generating the debug.keystore file that is used by default for deployment to local Android devices and emulators.
    • GitHub PR 3968: File extensions set in the $(AndroidStoreUncompressedFileExtensions) MSBuild property or in the corresponding Leave the following resource extensions uncompressed setting in the Visual Studio project property pages had to start with a . dot character to behave as expected. Now the . dot character is optional.
    • GitHub 3996: error XA5300: The Android SDK Directory could not be found. Please set via /p:AndroidSdkDirectory. could occur even after running the InstallAndroidDependencies MSBuild target on a newly configured build environment.
    • GitHub PR 4016: Unclear warning XA0110: Disabling true as it is not supported by `aapt2`. If you wish to use true please set true to false. appeared if the $(AndroidExplicitCrunch) MSBuild property was set to true in a project that was also configured to use AAPT2.
    • GitHub 4068: error MSB4044: The "CopyGeneratedJavaResourceClasses" task was not given a value for the required parameter "SourceTopDirectory". prevented incremental builds from completing successfully for projects using the Xamarin.AndroidX.Migration NuGet package.
    • GitHub 4074, GitHub 4182: Errors similar to error XA2002: Can not resolve reference: `System.Diagnostics.EventLog`, referenced by `Microsoft.Extensions.Logging.EventLog`. could prevent building if the NuGet package path was set to a custom location, for example via the NUGET_PACKAGES environment variable.
    • GitHub PR 4106: Any unhandled exceptions in the Xamarin.Android MSBuild tasks would result in two MSBuild errors instead of one.
    • GitHub PR 4131: error ADB1000 was shown in addition to error ADB0030 if the ADB0030 error condition occurred.
    • GitHub PR 4205: Some of the Xamarin.Android MSBuild tasks were using foreground logging methods from background threads. That usage pattern could in theory lead to lock ups in the Visual Studio user interface.

    Application behavior on device and emulator

    • Developer Community 788217: Exceptions similar to Android.Content.Res.Resources+NotFoundException: Resource ID #0x7f09001cv could cause apps to abort when trying to use Android resources if the [Activity(MainLauncher = true)] activity was in a library project.
    • Developer Community 878335, GitHub 4177: Starting in Xamarin.Android 10.1, Java.Lang.ClassNotFoundException: md545536373befe5ba5b0be978b998d36b6.TestSuiteActivity_TestData prevented running Xamarin.Android unit test app projects.
    • GitHub PR 3862: If an app referenced multiple libraries that each provided a different version of an Android resource, then the final selected version of the resource in the app was different when the app was built using AAPT2 instead of AAPT.
    • GitHub PR 3927: Starting in Xamarin.Android 10.1, native libraries did not load as expected for apps deployed in the Debug configuration using the Assemblies:Dexes fast deployment mode.
    • GitHub PR 3940: Starting in Xamarin.Android 9.4, Unknown Mono AOT mode could appear incorrectly in the app log output depending on the AOT mode.

    Application Mono Framework behavior on device and emulator

    • Developer Community 716868, Mono GitHub 18106: Starting in Xamarin.Android 9.2, No compatible code running appeared in the Visual Studio debugger after the debugger paused on breakpoints in callback methods from Android Java APIs, such as WebViewClient.ShouldInterceptRequest() or Android.OS.AsyncTask.RunInBackground().

    • Developer Community 756697: Starting in Xamarin.Android 10.0, NTLM authentication in Xamarin.Android apps no longer worked, resulting in server-side System.ComponentModel.Win32Exception exceptions.

      The initial fix for this issue in Xamarin.Android 10.1 was incomplete. Xamarin.Android 10.2 now includes additional changes that allow switching back to the Xamarin.Android 9.4 HttpClient behavior.

      To switch back to the Xamarin.Android 9.4 behavior, set the $(AndroidHttpClientHandlerType) MSBuild property to System.Net.Http.MonoWebRequestHandler, System.Net.Http in the .csproj file:

      <PropertyGroup>
        <AndroidHttpClientHandlerType>System.Net.Http.MonoWebRequestHandler, System.Net.Http</AndroidHttpClientHandlerType>
      </PropertyGroup>
      
    • Developer Community 720606, Mono GitHub 16742: System.ArgumentOutOfRangeException was thrown unexpectedly when calling DateTime.TryParseExact() with certain dates from the year 1948.

    • Mono GitHub 17878: In certain scenarios involving callbacks from native threads, apps could become unresponsive while running mono_gc_wait_for_bridge_processing().

    • Mono GitHub 18030: System.Net.Http.HttpRequestException: mono-io-layer-error (-1)* caused HttpClient requests to abort if the first IP address returned by the associated DNS query was not accessible.

    Design-time build process

    • GitHub PR 4199: Using ReSharper's class creation dialog in a Xamarin.Android project could lock up the Visual Studio interface.

    Android API bindings

    • GitHub 3712: The [Service] attribute did not yet include a property to set the new foregroundServiceType attribute that was added in Android 10 (API level 29).

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Versions for continuous build environments

    For users installing Xamarin.Android on macOS continuous build environments, the corresponding version of the Mono Framework MDK to use is Mono Framework MDK 6.8.0.123.

    For special scenarios where users require Xamarin.Android SDK version 10.2.0.100 without any subsequent 10.2 servicing fixes, the fixed-version Visual Studio 2019 version 16.5.0 BuildTools installer can be used on Windows, and the fixed-version .pkg installer package can be used on macOS. The fixed-version .vsix installer package is another alternative for Windows.

    Open source

    Xamarin.Android 10.2 is based on the open-source Xamarin.Android repositories:

    Source code(tar.gz)
    Source code(zip)
  • v10.2.0.100-pre(Mar 3, 2020)

    March 10, 2020 — Xamarin.Android 10.2.0.100 was published to the Preview updater channel of Visual Studio 2019 for Mac version 8.5 Preview 6.

    March 2, 2020 — Xamarin.Android 10.2.0.100 was published as part of Visual Studio 2019 version 16.5 Preview 5.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Issues fixed

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.8 runtime and class libraries from Commit 1cca0cfe to Commit c0c5c78e, adding 14 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    • Developer Community 756697: Starting in Xamarin.Android 10.0, NTLM authentication in Xamarin.Android apps no longer worked, resulting in server-side System.ComponentModel.Win32Exception exceptions.

      The initial fix for this issue in Xamarin.Android 10.1 was incomplete. Xamarin.Android 10.2 now includes additional changes that allow switching back to the Xamarin.Android 9.4 HttpClient behavior.

      To switch back to the Xamarin.Android 9.4 behavior, set the $(AndroidHttpClientHandlerType) MSBuild property to System.Net.Http.MonoWebRequestHandler, System.Net.Http in your .csproj file:

      <PropertyGroup>
        <AndroidHttpClientHandlerType>System.Net.Http.MonoWebRequestHandler, System.Net.Http</AndroidHttpClientHandlerType>
      </PropertyGroup>
      

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Source code(tar.gz)
    Source code(zip)
  • v10.1.4.0(Feb 11, 2020)

    February 11, 2020 — Xamarin.Android 10.1.4.0 was released as part of Visual Studio 2019 version 16.4.5

    Corresponding Visual Studio 2019 release notes

    Issues fixed

    Application and library build and deployment

    • Developer Community 790804, Developer Community 854497: Starting in Xamarin.Android 10.1, Mono.AndroidTools.RequiresUninstallException: The installed package is incompatible. Please manually uninstall and try again. interrupted deployment if the keystore used to sign the app had changed compared to the previous deployment. Xamarin.Android 10.1.4.0 now automatically takes care of uninstalling the app in this case, like Xamarin.Android 10.0 did.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the commercial .vsix installer package can be found in the project README.

    Open source

    Source code(tar.gz)
    Source code(zip)
  • v10.2.0.99(Feb 19, 2020)

    February 19, 2020 — Xamarin.Android 10.2.0.99 was published as part of Visual Studio 2019 version 16.5 Preview 3.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Issues fixed

    Application and library build and deployment

    • Developer Community 790804, Developer Community 854497: Starting in Xamarin.Android 10.1, Mono.AndroidTools.RequiresUninstallException: The installed package is incompatible. Please manually uninstall and try again. interrupted deployment if the keystore used to sign the app had changed compared to the previous deployment. The fix for this issue is also included in Xamarin.Android 10.1.4.0.
    • Developer Community 854863: More than one device connected, please provide --device-id could prevent deploying successfully in projects configured to use the Android App Bundle publishing format when more than one device or emulator was attached.
    • Developer Community 869165: error CS0234: The type or namespace name 'CodeDom' does not exist in the namespace prevented building successfully in projects that used the word System as a dotted part of the default namespace for the project.
    • GitHub 4068: error MSB4044: The "CopyGeneratedJavaResourceClasses" task was not given a value for the required parameter "SourceTopDirectory". prevented incremental builds from completing successfully for projects using the Xamarin.AndroidX.Migration NuGet package.
    • GitHub PR 4106: Any unhandled exceptions in the Xamarin.Android MSBuild tasks would result in two MSBuild errors instead of one.
    • GitHub PR 4121: warning XA2000: Warning: Use of AppDomain::CreateDomain detected in assembly ... The AppDomain's will not be part of .NET 5 and therefore will be missing in newer Xamarin.Android releases. did not indicate that .NET 5 will still include the AppDomain type but only support use of a single AppDomain.
    • GitHub PR 4131: error ADB1000 was shown in addition to error ADB0030 if the ADB0030 error condition occurred.
    • GitHub PR 4205: Some of the Xamarin.Android MSBuild tasks were using foreground logging methods from background threads. That usage pattern could in theory lead to lock ups in the Visual Studio user interface.
    • Java.Interop GitHub 556: An app that referenced a library using the new support for Kotlin libraries could build successfully using an older version of Xamarin.Android but then fail when running on device. Xamarin.Android 10.2.0.99 adjusts one of the new APIs in Java.Interop.dll so that older versions of Xamarin.Android produce a linker error at build time.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.8 runtime and class libraries from Commit df42020f to Commit 1cca0cfe, adding 17 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    • Developer Community 716868, Mono GitHub 18106: Starting in Xamarin.Android 9.2, No compatible code running appeared in the Visual Studio debugger after the debugger paused on breakpoints in callback methods from Android Java APIs, such as WebViewClient.ShouldInterceptRequest() or Android.OS.AsyncTask.RunInBackground().

    Design-time build process

    • GitHub PR 4199: Using ReSharper's class creation dialog in a Xamarin.Android project could lock up the Visual Studio interface.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix installer package can be found in the project README.

    Open source

    Source code(tar.gz)
    Source code(zip)
  • v10.2.0.84(Feb 11, 2020)

    January 22, 2020 — Xamarin.Android 10.2.0.84 was released as part of Visual Studio 2019 version 16.5 Preview 2.

    January 14, 2020 — Xamarin.Android 10.2.0.84 was released as part of Visual Studio 2019 for Mac version 8.5 Preview 1 in the Preview updater channel.

    Corresponding Visual Studio 2019 Preview release notes

    What's new

    Mono Framework version update to 6.8

    Xamarin.Android now uses the Mono 6.8 runtime and class libraries at Commit df42020f, bringing in about 800 new commits.

    Build and deployment performance

    • GitHub PR 3907: Adjust GenerateResourceDesigner to use System.Reflection.Metadata rather than Cecil, use loops instead of LINQ expressions, and skip over .NET Standard libraries. This reduced the time for the GenerateResourceDesigner task during an incremental build from about 470 milliseconds to about 370 milliseconds for a small app on a test system. The GenerateResourceDesigner task also runs in the foreground each time an Android resource is saved, so this makes Visual Studio more responsive when working on Android resources.
    • GitHub PR 3913: Skip the _GenerateJavaStubs target for builds where only Android resources have changed. This makes Visual Studio more responsive when working with Android resources. For example, it reduced the design-time build by about 400 milliseconds for a scenario where an Android resource was edited and saved in a moderately large app on a test system.
    • GitHub PR 4020: Skip a managed linker step for assemblies that have no references to Java.Lang.Object, such as .NET Standard libraries. This reduced the time for the _LinkAssembliesNoShrink target on a test system from about 160 milliseconds to about 50 milliseconds for an incremental build after a one-line change to the MainActivity class.

    App startup performance

    • GitHub PR 3951: Avoid searching for unmanaged compiled assemblies generated by Enable Startup Tracing or AOT Compilation unless the app was built with one of those options enabled. This reduced the Runtime.init() phase of application startup for a small test app from about 172 milliseconds to about 168 milliseconds.

    Improved Android manifest merging

    Xamarin.Android now includes an option to use the same Android manifest merger tool that Android Studio uses to merge AndroidManifest.xml files. This provides new capabilities and improves compatibility with Android Studio. See the documentation for details about the available merge rules.

    To enable the new behavior for your project, set the $(AndroidManifestMerger) MSBuild property to manifestmerger.jar in your .csproj file:

    <PropertyGroup>
      <AndroidManifestMerger>manifestmerger.jar</AndroidManifestMerger>
    </PropertyGroup>
    

    Any project authors who were previously using the Xamarin.Android.ManifestMerger NuGet package can remove that package after adding this setting.

    Bindings projects support for Kotlin libraries

    This release adds better support for creating bindings for Kotlin libraries, including:

    • Hiding Kotlin internal types and members
    • Using Kotlin provided metadata to properly name method parameters
    • Hiding Kotlin generated methods like foo-impl that aren't intended for public use
    • Restoring Kotlin-mangled method names to their original names, such as changing foo-V5j3Lk8 back to foo
    • Adding support for Kotlin's native unsigned types (UInt, ULong, UShort, UByte)

    Although it was technically possible to bind a Kotlin library previously, these changes greatly reduce the number of custom rules needed in the Transforms\Metadata.xml file to produce expected bindings.

    No additional steps are needed to enable this. The binding process will detect if a .jar file was produced from Kotlin and will apply the needed fixes.

    Important: Some of these changes required adding new APIs to Java.Interop.dll. This means that like the binding projects themselves, Xamarin.Android application projects that consume one of these new Kotlin library bindings must also be built using Xamarin.Android 10.2 or higher.

    New build errors and warnings XA0121, XA2000

    XA0121 error for old Xamarin.Android.Support library versions

    The XA0121 warning from Xamarin.Android 10.1 is now an error because compatibility with the old GetAdditionalResourcesFromAssemblies MSBuild task has been removed.

    Any project that uses one of the affected Xamarin.Android.Support libraries from version 26 or earlier will now see errors like:

    error XA0121: Assembly 'Xamarin.Android.Support.Animated.Vector.Drawable' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.
    

    To resolve these errors, update the project to use version 27 or higher of the Xamarin.Android.Support libraries.

    XA2000 warning for use of AppDomain.CreateDomain()

    The new XA2000 build warning identifies cases where projects are using the AppDomain.CreateDomain() API:

    warning XA2000: Warning: Use of AppDomain::CreateDomain detected in assembly: AndroidApp1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The AppDomain's will not be part of .NET 5 and therefore will be missing in newer Xamarin.Android releases.
    

    Because AppDomain in .NET 5 will follow the .NET Core semantics, where there is only exactly one AppDomain and AppDomain.CreateDomain() throws PlatformNotSupportedException, any projects currently using AppDomain.CreateDomain() will need to switch to a different API like AssemblyLoadContext. Project authors are encouraged to begin this transition as soon as they can to prepare for the behavior change.

    AndroidEnableDesugar now requires D8

    Xamarin.Android now always use the D8 DEX compiler for projects that have the $(AndroidEnableDesugar) MSBuild property set to true:

    <PropertyGroup>
      <AndroidEnableDesugar>true</AndroidEnableDesugar>
    </PropertyGroup>
    

    Similarly, Xamarin.Android now always uses the R8 code shrinker for projects that have $(AndroidEnableDesugar) set to true and that have the Code shrinker ($(AndroidLinkTool)) set to ProGuard or r8.

    Note: $(AndroidEnableDesugar) does not correspond to any setting in the project properties pages in Visual Studio, so this change only affects project authors who have added the property to their .csproj files by hand.

    Background information

    This change allows Xamarin.Android to remove support for the old desugar_deploy.jar mechanism from the Android Jack toolchain that was deprecated in 2017.

    Option for .NET exceptions from certain Android APIs

    Several methods in Xamarin.Android override or implement .NET base class library methods but do not throw the expected exception types for those methods. For example, Android.Runtime.InputStreamInvoker is a subclass of System.IO.Stream where the Read() method throws Java.IO.IOException instead of System.IO.IOException.

    Xamarin.Android 10.2 includes a new option to throw the expected exceptions from these methods. In some cases, like InputStreamInvoker.Read(), this means that the new exception type is thrown instead of the original exception type. In those cases, the original exception can be found in the InnerException property of the new exception.

    Important: Be careful about enabling this option in an existing application. It will break any existing code that attempts to catch one of the original Java namespace exception types from one of these methods.

    To enable the new behavior in your app, set the $(AndroidBoundExceptionType) MSBuild property to System in your .csproj file:

    <PropertyGroup>
      <AndroidBoundExceptionType>System</AndroidBoundExceptionType>
    </PropertyGroup>
    

    Known issues

    GitHub 4127: Even when the $(AndroidBoundExceptionType) MSBuild property is set to System, some of the methods in the Mono.Android.dll assembly do not throw all of the exceptions that are documented for the .NET base class library methods they override or implement.

    Custom profiles for Enable Startup Tracing

    The Enable Startup Tracing feature compiles a set of managed methods to unmanaged code to improve startup times. By default, only the common methods used during the startup of a basic Xamarin.Android app are compiled. For some apps, this default might not provide the optimum trade-offs between app size and startup times.

    Xamarin.Android 10.2 includes new MSBuild targets to help create custom startup tracing profiles based on the actual methods that a particular app calls during startup.

    Watch for future release notes updates with more information about how to use this feature.

    Known issues

    GitHub 4152: aotprofile-tool: Unable to read profile through local port: 9999 prevents the FinishAotProfiling target from completing successfully.

    Mono debugger loglevel passthrough

    The Mono soft debugger agent has an option to change the level of diagnostic information it logs. In the past, this log level was always 0 for Xamarin.Android apps. In Xamarin.Android 10.2, the log level can now be adjusted by setting the debugger-log-level option in the debug.mono.log Android system property. For example, the following command sets the log level to 10:

    adb shell setprop debug.mono.log debugger-log-level=10
    

    Mono compiler option passthrough

    The new $(AndroidExtraAotOptions) MSBuild property allows passing options to the Mono compiler in projects that have either Enable Startup Tracing or AOT Compilation enabled.

    In general, this property should be left blank, but in certain special scenarios it might provide useful flexibility.

    Note that this property is different from the related $(AndroidAotAdditionalArguments) property. That property places comma-separated arguments into the --aot option of the Mono compiler. $(AndroidExtraAotOptions) instead passes full standalone space-separated options like --verbose or --debug to the compiler.

    An example use would be to set the --verbose option to get additional diagnostic information during a command line build:

    msbuild -p:AndroidAotAdditionalArguments=verbose
    

    Issues fixed

    Application and library build process

    • Developer Community 797093, GitHub PR 3945: warning XA5302: Two processes may be building this project at once. Lock file exists at path: ... obj\Debug\100\.__lock often appeared unnecessarily when deploying to an emulator or device from within Visual Studio.
    • GitHub 3428: Xamarin.Android did not yet provide an option to use the AndroidManifest.xml merge tool that Android Studio uses.
    • GitHub 3622: Warnings similar to R8 : warning : Resource 'META-INF/MANIFEST.MF' already exists. could appear in the Error List window when building apps in the Release configuration with Code shrinker set to r8. These warnings from the upstream R8 tool are not currently relevant for Xamarin.Android users, so Xamarin.Android 10.2 now logs them as plain messages instead of warnings.
    • GitHub 3808: The type or namespace name ... could not be found in the global namespace prevented using %(Aliases) MSBuild item metadata on Xamarin.Android library project references.
    • GitHub 3852: The LinkAssemblies task could get stuck in an infinite loop in projects referencing certain libraries when the $(Nullable) MSBuild property was set to enable.
    • GitHub 3911: The managed linker did not yet remove the custom attribute metadata that C# 8.0 nullable reference types use. That metadata is only needed at build time.
    • GitHub 3920: If a NuGet package included a library without a [assembly:ReferenceAssemblyAttribute] attribute under a ref directory, then Xamarin.Android apps could unexpectedly use that ref version of the library instead of the expected version from the appropriate lib directory.
    • GitHub PR 3937: message ANDKT0000: Warning: The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format could appear in the diagnostic Xamarin.Android build output from Java's keytool.exe because Xamarin.Android did not yet specify a -storetype argument to keytool.exe when generating the debug.keystore file that is used by default for deployment to local Android devices and emulators.
    • GitHub PR 3968: File extensions set in the $(AndroidStoreUncompressedFileExtensions) MSBuild property or in the corresponding Leave the following resource extensions uncompressed setting in the Visual Studio project property pages had to start with a . dot character to behave as expected. Now the . dot character is optional.
    • GitHub 3996: error XA5300: The Android SDK Directory could not be found. Please set via /p:AndroidSdkDirectory. could occur even after running the InstallAndroidDependencies MSBuild target on a newly configured build environment.
    • GitHub PR 4016: Unclear warning XA0110: Disabling true as it is not supported by `aapt2`. If you wish to use true please set true to false. appeared if the $(AndroidExplicitCrunch) MSBuild property was set to true in a project that was also configured to use AAPT2.
    • GitHub 4182: Errors similar to error XA2002: Can not resolve reference: `System.Diagnostics.EventLog`, referenced by `Microsoft.Extensions.Logging.EventLog`. could prevent building if the NuGet package path was set to a custom location, for example via the NUGET_PACKAGES environment variable.

    Application behavior on device and emulator

    • Developer Community 788217: Exceptions similar to Android.Content.Res.Resources+NotFoundException: Resource ID #0x7f09001cv could cause apps to abort when trying to use Android resources if the [Activity(MainLauncher = true)] activity was in a library project.
    • GitHub PR 3862: If an app referenced multiple libraries that each provided a different version of an Android resource, then the final selected version of the resource in the app was different when the app was built using AAPT2 instead of AAPT.
    • GitHub PR 3927: Starting in Xamarin.Android 10.1, native libraries did not load as expected for apps deployed in the Debug configuration using the Assemblies:Dexes fast deployment mode.
    • GitHub PR 3940: Starting in Xamarin.Android 9.4, Unknown Mono AOT mode could appear incorrectly in the app log output depending on the AOT mode.
    • GitHub PR 3943: In Xamarin.Android 10.2.0.16, Unknown Mono AOT mode appeared incorrectly in the app log output for any app with Enable Startup Tracing or AOT Compilation enabled.
    • GitHub PR 3952: In Xamarin.Android 10.2.0.16, apps built in the Debug configuration took about 2 seconds longer to start than they had previously.

    Android API bindings

    • GitHub 3712: The [Service] attribute did not yet include a property to set the new foregroundServiceType attribute that was added in Android 10 (API level 29).

    Thank you

    A big Thank You! to community members who contributed improvements in this release:

    • @mathieubourgeois, GitHub PR 3940: Correct the way the MSBuild tasks save the $(AndroidAotMode) property into the app, so that Unknown Mono AOT mode does not appear in the app log output incorrectly.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the latest commercial .vsix and .pkg installer packages can be found in the project README.

    Open source

    Source code(tar.gz)
    Source code(zip)
  • v10.1.3.7(Jan 14, 2020)

    January 14, 2020 — Xamarin.Android 10.1.3.7 was released as part of Visual Studio 2019 version 16.4.3 and to the Stable updater channel of Visual Studio 2019 for Mac version 8.4.1.

    Corresponding Visual Studio 2019 release notes

    Issues fixed in Xamarin.Android 10.1.3.7

    Application and library build and deployment

    • Developer Community 845978, GitHub 3993: Starting in Xamarin.Android 10.1, You uploaded an APK or Android App Bundle with invalid or missing signing information for some of its files prevented uploading successfully to Google Play for apps built using the Android App Bundle publishing format.

    Application Mono Framework behavior on device and emulator

    This version of Xamarin.Android updates the Mono 6.6 runtime and class libraries from Commit bef1e633 to Commit fd9f379d, adding 3 new commits.

    Fixes included for issues reported with Xamarin.Android applications:

    • Developer Community 756697: Starting in Xamarin.Android 10.0, NTLM authentication in Xamarin.Android apps no longer worked, resulting in server-side System.ComponentModel.Win32Exception exceptions.

    Installing

    To get the new version in Visual Studio, update Visual Studio:

    For other scenarios, the commercial .vsix and .pkg installer packages can be found in the project README.

    Mono version for continuous build environments

    For users installing Xamarin.Android on macOS continuous build environments, the corresponding version of the Mono Framework MDK to use is Mono Framework MDK 6.6.0.155.

    Open source

    Source code(tar.gz)
    Source code(zip)
Owner
Xamarin
Xamarin
Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,...

Note: Due to lack of time, Iconify is no longer maintained and icon packs are outdated. I'd be very happy to welcome a new contributor, please reach m

Joan Zapata 3.9k Dec 24, 2022
A cool Open Source CoverFlow view for Android with several fancy effects.

FancyCoverFlow THIS PROJECT IS NO LONGER MAINTAINED! What is FancyCoverFlow? FancyCoverFlow is a flexible Android widget providing out of the box view

David Schreiber-Ranner 1.1k Nov 10, 2022
Beagle is an open-source framework for cross-platform development using the concept of Server-Driven UI.

Beagle Getting Started · Learn the Basics · Contribute Beagle is an open-source framework for cross-platform development using the concept of Server-D

ZUP IT INNOVATION 657 Dec 28, 2022
A backport of the Android 4.2 GlowPadView that works on the SDK on API levels 4+

GlowPadBackport A backport of the Android 4.2 GlowPadView that works on the SDK on API levels 4+. It is heavily based upon Google's own internal imple

Frakbot 246 Dec 9, 2022
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022
[] Android library that provides a file explorer to let users select files on external storage.

aFileChooser - Android File Chooser aFileChooser is an Android Library Project that simplifies the process of presenting a file chooser on Android 2.1

Paul Burke 1.8k Jan 5, 2023
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android

Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager.

Julián Suárez 520 Nov 11, 2022
Provides 9-patch based drop shadow for view elements. Works on API level 9 or later.

Material Shadow 9-Patch This library provides 9-patch based drop shadow for view elements. Works on API level 14 or later. Target platforms API level

Haruki Hasegawa 481 Dec 19, 2022
A library that provides an implementation of the banner widget from the Material design.

MaterialBanner A banner displays a prominent message and related optional actions. MaterialBanner is a library that provides an implementation of the

Sergey Ivanov 252 Nov 18, 2022
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months

Custom-Calendar-View To use the CustomCalendarView in your application, you first need to add the library to your application. You can do this by eith

Nilanchala Panigrahy 113 Nov 29, 2022
Janishar Ali 2.1k Jan 1, 2023
a custom view that provides dragged and scaled

DragScaleCircleView A custom imageview that provides the circle window can be dragged and scaled, crop image. How does it look? Why? Sometimes need to

null 514 Dec 22, 2022
Sentinel is a simple one screen UI which provides a standardised entry point for tools used in development and QA alongside device, application and permissions data.

Sentinel Sentinel is a simple one screen UI that provides standardised entry point for tools used in development and QA alongside device, application

Infinum 29 Dec 12, 2022
An Android application which visualizes some of the famous Algorithms for finding path from Source to Destination in a 2D grid.

Pathfinding-Visualizer An Android application which visualizes some of the famous Algorithms for finding path from Source to destination in a 2D grid.

Pranjal Mishra 37 Aug 8, 2022
Useful library to use custom fonts in your android app

EasyFonts A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder.Also by using this l

Vijay Vankhede 419 Sep 9, 2022
⚡️A highly customizable, powerful and easy-to-use alerting library for Android.

Flashbar A highly customizable, powerful and easy-to-use alerting library for Android. Specs This library allows you to show messages or alerts in you

Aritra Roy 1.7k Dec 7, 2022
A simple, customizable and easy to use swipeable view stack for Android.

SwipeStack A simple, customizable and easy to use swipeable view stack for Android. QuickStart Include the Gradle dependency dependencies { compil

Frederik Schweiger 1.5k Dec 30, 2022
A small, easy to use android library for implementing flipping between views as seen in the popular Flipboard application

FlipView About This library is made to be very easy to use and at the same time be feature complete. With only a few lines of code you can have a flip

Emil Sjölander 924 Nov 10, 2022