Xamarin.Android 7.0: Let's try this open-source thing, right?
Xamarin.Android 7.0 is the first release to use the open-source repositories
- Core JNI interaction logic is in the Java.Interop repo
- Android bindings and MSBuild tooling are in the xamarin-android repo.
- Chat is in the
Android v7.0 Nougat adds support for the Vulkan API. Vulkan support will not be distributed as part of the core Xamarin.Android binding. Instead, please use the VulkanSharp NuGet package, and the XLogo sample app.
Note: Xamarin.Android 7.0 requires JDK 1.8 to use the Android Nougat (API 24) APIs. You can continue to use earlier versions of the JDK if targeting earlier Android API levels:
Additionally, a 64-bit version of the JDK is required to use custom controls in the Android designer.
The simplest option is to install the 64-bit version of JDK 1.8 since it is backwards compatible with all of the previous API levels and supports the new Android designer features.
(One unfortunate complication with JDK 1.8 is that is not compatible with the outdated version of Proguard that is included in the Android SDK. Currently this will cause an error "Unsupported class version number [52.0]" when attempting to use the Proguard or Multidex features in Xamarin.Android. See 44187.)
Due to a change by Google, Android N will now only permit linking to NDK-provided native libraries.
libsqlite.so is not an NDK-provided native library. Consequently,
existing apps using e.g.
Mono.Data.Sqlite.dll will crash when
running on Android N. This may include other SQLite-using assemblies,
not distributed with Xamarin.Android.
All Developers need to audit their code for P/Invoke and ensure that referenced
native libraries are either included in the Android NDK, or are included within
app.apk itself. The only Xamarin.Android-provided assembly impacted by
this change is
Xamarin.Android changed the default GC Bridge from
Unfortunately, a few bugs have been reported which suggest a bug within the Tarjan GC bridge.
If this happens, create an
and add the following line:
This will cause the app to use the previous GC bridge.# Xamarin.Android 7.0.2
Xamarin.Android 7.0.2 contains bug fixes.## Bug Fixes
is defined in an assembly that is not referenced. You must add a reference to assemblySystem.ObjectModel
for Android projects that reference PCLs that useINotifyPropertyChanged`.
Add support for
Debug deploy always fails:
ZipException: Entry has been changed
- 44193: MSB3247 warning when building Xamarin.Forms app.
- 44268: "Unexpected libzip error: Inval" when building project that references Android Support Libraries on Windows if user name contains any accented characters
<AndroidUseSharedRuntime/>in some projects causes
classes.dexto not deploy to device when using Xamarin Studio.
- 44685: VS2015 freeze for a few minutes when trying to start a debug session
- 45018: Possible memory leak of whole Task chain for SDK resolving
- 45113: Can't run a C# android app using an FSharp 4.0 Library
- 45543: Android application fails to launch and crashes on device/simulator.
- 39832: SIGSEGV when running roslyn
Thread.Sleep()overhead too big
TrustFailure (The authentication or decryption has failed.)...
Invalid certificate received from server.with
Error code: 0x5or
Error code: 0xffffffff800b010fwhen attempting to access HTTPS servers on ports other than 443.
Xamarin.Android 7.0.1 contains bug fixes.## Bug Fixes
HTTP Bad Request (400) when encoding space (%20) in URL with
Debug deploy always fails:
ZipException: Entry has been changed
- 44268: [Cycle 8] "Unexpected libzip error: Inval" when building project that references Android Support Libraries on Windows if user name contains any accented characters
- 44448: SIGSEGV during process startup.
- Send all data to the socket before exiting from
Xamarin.Android apps on the Samsung Galaxy S7 fails to start with the error
Invalid certificate received from serverwhen accessing HTTPS servers on ports other than 443.
- Bindings for
Android 7.0 Nougat
via the new
- Default GC bridge changed to Tarjan
In previous releases,
Mono.Data.Sqlite.dll would P/Invoke into the
/system/lib/libsqlite.so native library.
Starting with Android N, Android will no longer permit this behavior,
so previous versions of
Mono.Data.Sqlite.dll will throw a
DllNotFoundException when attempting to use SQLite functionality
when executing on Android N.
Mono.Data.Sqlite.dll will now bundle and distribute a custom SQLite,
libsqlite3_xamarin.so, which will automatically be bundled into
Mono.Data.Sqlite.dll is referenced.
Existing users of
Mono.Data.Sqlite.dll need only rebuild their app.
However, if any other assembly is P/Invoking
or variations thereof, these SQLite uses will not be updated.
Those other assemblies will need to be updated.
will not work on Android N, while the updated
has been updated to distribute its own copy of SQLite, and will work
on Android N.
This change may introduce GC bugs.## Experimental Features
Xamarin.Android 7.0 introduces several experimental features:### Improved Fast Deployment
is a way to avoid rebuilding and redeploying Android Packages (
when assemblies have changed in a way that doesn’t require changing the generated
Android Callable Wrappers
or altered any included Android Assets and Resources.
Xamarin.Android 7.0 will optionally allow Android Assets, Resources, and
compiled Java libraries to particpate in fast deployment as well, further
reducing the number of situations in which a possibly slow
and redeploy will be required.
This new behavior is disabled by default. It will be enabled by default in the Xamarin.Android 7.1 series.
To enable this new functionality, set the
MSBuild property to
Adding Resources to the Default Project
For example, assume a new (default) Application project which has already been deployed to a target device.
Resources\layout\Another.axml, and add
Resources\layout\Another.axmlto the project.
- Run the project.
(2) will require that the
.apk be rebuilt and re-deployed to the target.
In previous versions, (2) could take 16 seconds.
With the new system
Add some small benchmarks about what happens during dev when code changes, or a resource changes, numbers before/after## Known Issues
43838: "error CS1929: Type `System.Array' does not contain a member `OfType' and the best extension method overload ... requires an instance of type `System.Collections.IEnumerable'" when certain portable class libraries are referenced (such as the MathNet.Numerics NuGet package).
44184: "The "BuildApk" task failed unexpectedly. Xamarin.Tools.Zip.ZipException: Entry has been changed" when attempting to archive or deploy apps that use certain NuGet packages.
- Workaround: Copy this patched version of libZipSharp.dll from the Xamarin.Android team into C:\Program Files (x86)\MSBuild\Xamarin\Android\ on Windows or /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/xbuild/Xamarin/Android/ on Mac, overwriting the existing file. (From Comment 33 on the bug report.)
44268: "Unexpected libzip error: Inval" when building projects that reference any of the Android Support Libraries on Windows if the user name contains any accented characters.
Temporary workaround: Create and log in with a Windows user account that has only ASCII letters in the user name.
Alternate workaround: Add a XAMARIN_CACHEPATH environment variable under Control Panel > System > Advanced system settings > Environment Variables, and set it to a path that uses only ASCII letters in the directory names.
- 14918: mandroid daemon not supporting reading accented characters. (The mandroid daemon is dead! Dead!!!!!)
- 31763: Adding an Android Library Project to an Android Binding project causes referencing app project's build to fail.
Debugger exits with
art/runtime/fault_handler.cc:117] Check failed: !initialized_
- 40239: SIGSEGV with the Bug 27408 repro.
- 40749: [Regression] Translation with resx files is broken (version 18.104.22.168)
- 40976: Custom Application subclass does not extend MultiDexApplication when MultiDex is enabled
[XVS 4.0] VS hangs/freezes when opening solutions containing Android Bindings Libraries that reference other libraries, during
- 42082: "Ionic.Zip.ZipException ... __AndroidLibraryProjects__.zip is not a valid zip file ---> System.TimeZoneNotFoundException" when building Android projects in certain Windows time zones.
A numeric comparison was attempted on
$(_DeviceSdkVersion)that evaluates to
""instead of a number, in condition
"$(_DeviceSdkVersion) >= 21".
Xamarin can't find NDK 12b because
- 42643: [AndroidPublishing] VS crashes randomly while Archiving the application.
- 43151: [AndroidClientHandler] Doesn't support redirect to-from https/http
The venerable mandroid daemon no longer exists. Consequently, it can't be used to obtain the product version:
# This no longer works $ /Developer/MonoAndroid/usr/bin/mandroid --version
The Xamarin.Android version information can be obtained from Visual Studio and Xamarin Studio, or on macOS the following files may be used to determine version information:
Version: The Xamarin.Android version number, as a major.minor.build.
Version.rev: The revision number; the number of commits since
Version.commit: The branch and commit hash that generated the build.
- 5644: Mono allows to access not accessible method
- 6057: UdpClient IPv6 Receive throws ArgumentException
- 8554: System.Net.NetworkInformation.Ping - SendPingAsync operation fails
mono_jit_cleanupasserts/aborts on shutdown if soft debugging
- 11699: FileStream writing incorrectly (some internal position is wrong)
- 12205: MethodInfo.ReflectedType returns declaring type for generic base classes
- 13538: Extraneous lines in Application Output for Debug.WriteLine
- 13957: Xamarin.Android Apps are crashing on dual core x86 Devices
- 18361: FileInfo.MoveTo does not work with absolute paths
- 20186: Another AOT bug
- 23206: MS allows threadpool threads to be renamed multiple times
- 24641: CompareInfo.Compare() does not recognize ignorable characters when CompareOptions.Ordinal is specified
- 24974: Exception occurs in __ComObject finalizer when shutting down process
- 27303: NullReferenceException with ARMv7
- 29585: Type.GetMethods returns generic method that cannot be specialized
- 29916: System.Reflection.ParameterInfo.GetCustomAttributes always throws NullReference exception.
- 30686: ZipArchive ctor throws InvalidDataException for WebConnectionStream
- 33183: Unexpected behavior can occur when horizontal or vertical scrollbar value changes in TreeView
- 33551: – System.Net.SmtpClient uses an invalid HELO name
- 33553: System.IO.Compression.ZipArchive produces bad archive files
- 33809: Exception with SignalR 2.2 and Mono 4.2.0
- 35004: Filename returned by LocalEndpoint of UnixListener has null characters appended to the end which causes the socket file to not be deleted when the UnixListener is disposed
- 35872: Cultureinfo -> numinfo internal field is NonSerialized on Mono, but not on Windows
- 35876: Incorrect return of DateTime.ToUniversalTime method for DateTime.MaxValue.
- 36080: [Mono 4.2] "'System.ServiceModel.EndpointAddress10' does not have a static method 'GetSchema' that takes a parameter of type 'System.Xml.Schema.XmlSchemaSet'" when using the Xamarin Mobile profile with some WCF client apps
- 36192: Error binding Socket to Loopback
- 36388: Application settings produce extra XML headers during saving
- 36560: Unhandled exceptions outside the main execution context are ignored
- 36786: Dictionary constructed with StringComparer.OrdinalIgnoreCase malfunctions if culture is changed after adding values
- 36829: XmlSerializer does not support subclasses when serializing sequences of items
- 37583: MAJOR performance decrease between 22.214.171.124 and 4.2.1
- 37681: Fails to parse negative integers with Hebrew region set
- 37695: Delegate references an overridden method in derived class misbehaves when marshalled as a parameter to native C function.
- 37848: CultureInfo.GetCultureInfo(0) should throw ArgumentOutOfRangeException instead of CultureNotFoundException
- 37891: System.Net.Configuration/SmtpSection.cs missing 'deliveryFormat'
- 38012: Using Task's under memory pressure leads to unexpected crashes inside the TPL on iOS
- 38025: "Step Out" gets confused by nested code
- 38161: instability/crash when using DateTime under cpu load
- 38223: missing package in arm64 build
- 38250: Stack Corruption in mono involving tailcalls (where code is fine on Windows)
- 38322: HttpListenerRequest.IsLocal isn't good enough
- 38408: Error disposing of Filestream when leaving using statement
- 38553: FileVersionInfo.ProductVersion is not populated from AssemblyVersion
- 38599: Regression: SynchronizationContext.Current returns wrong value in delegate run by SynchronizationContext.Send.
- 38600: mkbundle Doesn't support assemblies with spaces in their names.
- 38712: Mono 4.3 Cryptography.ProtectedData fails to decrypt data from Mono 4.2
- 38796: FileInfo.ToString misbehaving after MoveTo
- 38818: linked apps with Java.Interop.dll crash on device
mono_image_open()does not check header anymore
- 38933: CryptographicException from ProtectedData in multi-threaded execution
- 39077: AppDomain.CurrentDomain.UnhandledException prevents exceptions in ThreadPool from crashing the application
- 39279: Thread pool sizes are incorrect on linux when processor affinity is set, which complicates running mono applications in docker containers
- 39282: [System.IO.Compression] issues with ZipArchiveEntry streams
- 39307: HTTPS connections broken in recent Linux snapshot builds
- 39347: Assertion when passing delegate of icall method to p/invoke
icall.c:5484: Could not resolve type with token 01000008 assembly:System.IdentityModel, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.IdentityModel.Tokens.IssuerTokenResolver member:<none>
- 39569: Validation of ETag by HttpHeaders.Add is too strict
- 39631: PPDB support fails to load any pdb when verifier is involved
* Assertion at image.c:512, condition 'image->heap_guid.size >= 16' not met
- 39669: System.Configuration.DictionarySectionHandler is missing
- 39715: ppdb support causes crash at shutdown
Assertion at method-to-ir.c:11652when using mono master/ca7b692f4 and nuget
- 39824: SerializationException thrown when serializing an Exception that uses SerializeObjectState
- 39911: System.Reflection.Emit.DerivedType isn't an IReflectableType so GetTypeInfo throws
* Assertion: should not be reached at mini.c:4403
- 40060: System.TypeSpec.Parse cannot parse generics + anonymous type name
- 40175: Runtime crashes on '-v --version'
- 40187: System.IO.Directory.CreateDirectory on Linux does not handle /.. in the path
- 40239: SIGSEGV 27408 repro
- 40368: Setting FileInfo.LastWriteTime has different results with mono32 and mono64
- 40536: Compiler crash when attaching an event of a templated delegate with wrong template type
- 40568: Runtime crashing on System.Enum.GetValues on char enums with F#
- 40603: Mono can't parse Date in DB wich is in format: "2016-02-04 10:39:11Z"
- 40643: Process leaking handles leads to "too many open files"
- 40646: Oid and FriendlyName for sha384
- 40697: Some NumberFormat have wrong GroupSeparator
- 40758: [Regression] Remoting instance is not proxied
- 40916: [System.IO.Compression] ZipArchive can create an ZipArchiveEntry that has a modified time of DateTime.MinValue
- 40953: Bad performance using TypeBuilder
- 41035: DataViewTest2.DataView_ListChangedEventTest occasionally fails with llvm+sgen
- 41224: HttpClientHandler.UseProxy = false setting is ignored.
- 41280: System.MethodAccessException is thrown from wrong frame
- 41431: [aot] Build fails due to 'Sgen STW requires a working mono-context' error
- 41492: DateTimeOffset.ToLocalTime() throwing erroneous error
- 41509: 41509 – DLR crashes when trying to convert a object to null.
- 41552: HttpResponseMessage does not support multiple Links header entries
- 41616: Mono 4.4.0 crashes when using Socket.ConnectAsync to a unix domain socket if the path doesn't exist
- 41623: "Step Over" on an Android App deployed to a physical/virtual device crashes the app
- 41667: new DateTime().ToLocalTime() results in an exception
- 41775: Zip version needed to extract not correct in System.IO.Compression
- 41782: [Cycle 7] "System.Net.WebException: Error: NameResolutionFailure" when attempting web requests with certain raw IP addresses
[SGEN?] XS crashed. error:
* Assertion at gc.c:867, condition 'finalizer_thread_exited' not met
- 41874: Reflection throws AmbiguousMatchException when calling GetProperty on a class that inherits from a generic base class.
- 41897: NotSupportedException thrown from IPInterfaceProperties.UnicastAddresses
- 42219: [System.IO.Compression] Cannot create ZipArchive with duplicate entries with same name
- 42274: System.IO.Compression.ZipArchive vs System.Xml.XmlReader
- 42413: Volatile fields don't enforce acquire - release semantics like Volatile.Read() and Volatile.Write()
- 42625: coop: crash with watchos system tests
- 42688: Can't wait for more than 429496 ms (429s)
System.Net.WebException: Error: NameResolutionFailureon second web request to certain raw IP addresses with
System.Uricannot parse url with underscore at start
Runtime crash at
reflection.c:mono_custom_attrs_construct_by_typewhile calling GetCustomAttributes for a proxy class
Index was out of range. Must be non-negative and less than the size of the collection" in
System.Collections.Generic.List1[T].set_Item()` when attempting to compile certain C# code involving tasks, async/await, and try/catch/finally
WebClient.DownloadString()returns 401 Unauthorized when using Basic authentication
- 42584: InternalError / Crash when using System.Net.Http and PCL library
- 42606: [Regression] Compact seq point enabled by default causes 100% CPU usage
- 42887: Encoding iso-8859-1 throws IndexOutOfRangeException for Unicode surrogate pairs
- API Level 10: Mono.Android.dll, OpenTK.dll, OpenTK-1.0.dll
- API Level 15: Mono.Android.dll
- API Level 16: Mono.Android.dll
- API Level 17: Mono.Android.dll
- API Level 18: Mono.Android.dll
- API Level 19: Mono.Android.dll
- API Level 20: Mono.Android.dll
- API Level 21: Mono.Android.dll
- API Level 22: Mono.Android.dll
- API Level 23: Mono.Android.dll
- NEW API Level 24 (vs. API-23): Mono.Android.dll