Xamarin.Android 4.12

The Xamarin.Android 4.12 series adds bindings for Android 4.4 KitKat and adds some workarounds for the ART 4.4.2 runtime.

Xamarin.Android 4.12.6

Bug fixes

  • 20911 Fixes a regression introduced by Android SDK Tools r23 and Android Build-tools r20 that changed the path of the zipalign tool.

Xamarin.Android 4.12.5

Bug fixes

  • 19161: Fix InvalidCastException in System.Net.WebConnectionStream.WriteRequestAsyncCB

Xamarin.Android 4.12.4

New Features

Bug fixes

  • 18016: First app startup when using Renderscript may result in GC deadlock.
  • 18757: Error MSB3375 when attempting to debug PCL in VS.

Integrated Mono features/fixes

Based on Mono 3.4 (-ish) commit fcf29c0e.

  • 4510: Marshal.SizeOf returning wrong size.
  • 5835: Runtime crash with: "null ResolutionScope not yet handled".
  • 6843: Allow a TLS1.1+ client to fallback to TLS1.0 when using System.dll/Mono.Security.dll for server side SSL/TLS.
  • 12571: Usage of XElement with XmlAnyElementAttribute is not supported by XmlSerializer.
  • 13281: HttpClient.GetAsync(string requestUri, CancellationToken cancellationToken) does not pass cancellationToken to SendAsync method.
  • 15143: BinaryReader.ReadString problems.
  • 15293: System.Net.Security.SslStream crashes.
  • 15451: HttpWebRequest performs blocking operations exhausting the threadpool when using SSL.
  • 15463: mono converts float multiplication back to a float before casting to int.
  • 15574: Recursive KnownType (as output by slsvcutil.exe) causes stack overflow during DataContractSerializer constructor.
  • 16119: Process.Start leaves stray "open" processes
  • 16327: Mono needs to expose configuration for TLS.
  • 16744: DataContractJSONSerializer produces different result to Microsoft.Net version.
  • 16807: Assertion should not be reached while run code from debugger.
  • 17183: System.IO.Compression.DeflateStream gives incorrect data after compress/decompress cycle.
  • 17204: EndPointManager.GetEPListener() binds to all IP addresses when given a host-name instead of looking one up.
  • 17256: CancellationTokenSource.Cancel() throws ObjectDisposedException.
  • 17290: Use of ThreadLocal with struct causes memory leaks.
  • 17310: stepping through code breaks execution.
  • 17318: TryValidateProperty returns true when property is nullable and required and the value is null.
  • 17536: Incorrect rounding when real literal's precision is beyond decimal type (28+).
  • 17577: Empty value-type hashcode is not constant.
  • 17587: Unexpected System.ArgumentException: Type Char* cannot be marshaled as an unmanaged structure.
  • 17590: * Assertion at sgen-alloc.c:425, condition `*p == NULL' not met.
  • 17628: "55" (or "\xFF15\xFF15") is recognized as an integer.
  • 17632: Incorrect ProcessorArchitecture for MSIL assemblies
  • 17636: int.Parse() does not support negative exponents
  • 17663: DataContractSerializer does not correctly serialize System.Guid or System.Char
  • 17699: TimeSpan.ToString() format doesn't match the Microsoft spec.
  • 17736: Mono adding extra Content-Length header to DELETE requests.
  • 17760: System.Collection.Generic.List<T>.Enumerator.Reset() does not reset 'current' field.
  • 17805: * Assertion at mini.c:4157, condition `code' not met
  • 17861: HttpClient's ContentLength fails to be computed when return is gzip stream.
  • 17897: MemoryCacheEntryPriorityQueue throws out of bounds on resize.
  • 17977: appdomain unload crash.
  • 17987: * Assertion at mini.c:4167, condition `code' not met
  • 18000: * Assertion: should not be reached at mono-threads-posix.c:154
  • 18052: DateTime.Parse() value stored incorrectly
  • 18063: A dynamically allocated string is referenced after it has been freed in the internals of GetHostByName.
  • 18068: locals init is forced to true, even when it is not set.
  • 18100: Stepping failed due to ERR_UNLOADED.
  • 18121: LocalCallContext is not captured by ThreadPool and new Thread().
  • 18131: DataContractJsonSerializer.ReadObject of a double returns invalid result in German Region.
  • 18162: CultureInfo.ClearCachedData() throws argument null exception.
  • 594490: XmlAttributeAttribute outputting ':' as _x003A_ differs from .NET behavior.
  • 599689: XmlScemaException.ToString() doesn't exactly match .NET.

Xamarin.Android 4.12.3

New Features

  • Support for ART Android runtime.

Bug fixes

  • OpenTK context fixes
  • 17630: Fix nonvirtual method invocation when running on ART.
  • 18024: Install System.Runtime.InteropServices.WindowsRuntime.dll and System.IO.Compression.dll on Windows.
  • 18378: WebStack: Missing method implementations in HttpWebRequest and WebRequest.

Xamarin.Android 4.12.2

The 4.12.2 update is a Windows-only release that fixes the Android designer in Visual Studio for users who have upgraded to Android SDK Tools 22.6.

4.12.2 requires the updated Android SDK Tools 22.6 to use the Android Designer in Visual Studio, and will prompt you to upgrade if you are on an older version.

Fixes

  • 18218: Unable to open Android designer when SDK tool version is below 22.6

Xamarin.Android 4.12.1

The Xamarin.Android 4.12.1 release is a hotfix release to address issues in Xamarin.Android 4.12.0.

Fixes

  • 15572: Fixes an exception thrown when XmlFormatterDeserializer.GetTypeFromNamePair() was deserializing a KnownType(typeof(string[])).
  • 16801: Fixes an issue that was causing some projects using components to fail after cleaning and rebuilding.
  • 18013: Install the Android API-19 platform apk on Windows.

Xamarin.Android 4.12.0

New Features

  • Xamarin.Android.NUniteLite.dll now binds NUniteLite 1.0.
  • ART 4.4.2 weak global reference workaround support: When running on Android v4.4.2 when ART is enabled, the GC will now use java.lang.WeakReference instances instead of JNI Weak GlobalReferences (which is the same behavior as when running on Android v2.1 and prior targets) in order to work around an ART bug. This workaround will not be used on Android v4.4.3, on the hopes/assumption that the fix will be integrated by then. (This may be a mistake.)

Known Issues

  • Xamarin.Android is not supported on ART. Full ART support will be provided in a future release. Please see Bug #17630 for details.

Behavior Changes

  • OpenTK, AndroidGameView: We now call the MakeCurrent method before calling the OnRenderFrame method in the AndroidGameView class, so that the render frame callback is always called with the right GL context. In case you want to return to the original behavior, set your AndroidGameView's instance AutoSetContextOnRenderFrame property to false.

Bug fixes

  • Multithreading fixes when looking up Java.Lang.Object mappings.
  • PCL fixes.
  • 5590, 16075: Interface dispatch bug fixes.
  • 12048: Missing static methods from type Android.Graphics.Color.
  • 13019: Visual Studio: ABI's getting serialized incorrectly into .csproj file using %3b instead of comma.
  • 13370: Compiler complains I am using System.ServiceModel when I am not.
  • 13953: RSACryptoServiceProvider.SignData() doesn't support OID providers.
  • 14129: Krait CPU bug fixes.
  • 15127: Enums: Invalid method signature for PackageManager.SetApplicationEnabledSetting() and SetComponentEnabledSetting()
  • 15300: Visual Studio: Selecting an emulator from the drop-down starts it.
  • 15559: javac compilation failed is path contains accentuated characters.
  • 15573: Two Android Binding Library together cause build error
  • 15891: Android/Java methods that take a Set/Map/List as an argument cause various exceptions, IncompatibleClassChangeError, ArgumentNullException.
  • 15892: Enums: GattState should be an enumeration, and overrides that have GattState should use it
  • 16137: InvalidCastException from Camera.Parameters.SupportedPreviewFpsRange
  • 16147: Android.Text.InputTypes enum is not marked with FlagsAttribute
  • 16285: Xamarin.Android emits spurious activation error when set to use latest SDK
  • 16377: MCW subclass object instance activation only calls the (IntPtr handle, JniHandleOwnership transfer) constructor
  • 16434: Xamarin tools cause errors editing project properties in Visual Studio 2013.
  • 16622: Cascading Rebuild due to using Libraries with IncludeAndroidResourcesFromAttribute
  • 16679: Android.App.SyncContext.Post() is synchronous when invoked from the Main/UI thread.
  • 16817: Fix Facebook sample compilation.
  • 16766: Adding a reference to Nito.AsyncEx.Enlightenment.dll causes the incorrect System.dll to be used?
  • 17068: Add support for DoNotPackageAttribute.
  • 17156: Prefer Build-tools 19.0.1 so that the Resources\transition directory is supported.

Integrated Mono features/fixes

Based on Mono 3.2.5 commit f624a395.

  • 3501: Fix File.GetAttributes() for group-writable files.
  • 5245: IEquatable<T>, IEqualityComparer<T> are ignored by LinkedList<T>.Find().
  • 5700: Step over stopping too early in recursive call.
  • 10883: Exception when external process ends.
  • 11335: WebOperationContext.Current.OutgoingRequest.Headers is null in OperationContextScope.
  • 11336: OperationContext.Current.OutgoingMessageProperties not setting HTTP request headers.
  • 12754: Linux bug in _wapi_setsockopt implementation
  • 12875: Using System.Net.HttpRequest::EndGetRequestStream.
  • 14950: Assertion at debugger-agent.c:4154, condition `count > 0' not met
  • 15124: TypeLoadException when resolving qualified names of generic, compiler-generated F# types.
  • 15320: Debugger display attributes don't support inheritance
  • 15347: AssemblyName.ProcessorArchitecture always returns "None".
  • 15425: CultureInfo problem cy-GB.
  • 15552: System.Xml.Schema.Extensions class missing.
  • 15719: InvalidProgramException when executing async event handler that doesn't await.
  • 15759: Mono GC deadlock.
  • 15857: HttpClient async cancellation of POST requests unreliable
  • 15875: CultureInfo.CurrentCulture needs more intelligent fallback.
  • 15895: CultureInfo for Indonesia shows incorrect currency decimal places
  • 15956: Task.WhenAll<T> task hangs when list of tasks to wait for is empty.
  • 15969: Segmentation fault on thread abort
  • 15987: Floating point results differ between .NET and mono.
  • 16021: Setting ReceiveBufferSize & SendBufferSize on TcpClient or Socket doesn't have the desired affect
  • 16071: System.ComponentModel.Design.HelpKeywordAttribute not implemented.
  • 16113: Add support for letting the remote know about the inferior's exit code.
  • 16267: Wrong SemaphoreSlim.Wait busy-loop delay when no timeout.
  • 16318: List<T> initializes to different size than Microsoft compiled CIL
  • 16334: ConcurrentBag.TryTake() and TryPeek() can return true with no result.
  • 16365: TextInfo.ToTitleCase() differs from .Net implementation.
  • 16432: Mono GC deadlock 2.
  • 16449: SIGSEGV in Arrays.
  • 16487: Assembly.CreateInstance doesn't calls AssemblyResolve if assembly not found.
  • 16489: NullReferenceException in System.NumberFormatter.ResetCharBuf.
  • 16526: Mono's BigInteger converts a large negative to a positive int64.
  • 16529: F# unativeint conversion from Double to UIntPtr generates conv.u instruction which is not implemented by Mono.
  • 16530: Bug in LINQ Join over IEnumerable data when both rows have a null key.
  • 16548: async / await "finishes" running thread and resumes execution on main UI thread
  • 16587: Task implementation does not run continuations on correct TaskScheduler.
  • 16634: System.Net.Http.Headers.HttpContentHeaders.TryGetValues() throws exception.
  • 16647: Performance improvements in Join<T> (string separator, IEnumerable<T> values)
  • 16670: System.Net.Http.HttpClient.PutAsync method sends the request as GET method.
  • 16730: ConcurrentDictionary is not marked as Serializable.
  • 16788: Thread.GetNamedDataSlot incorrectly increments the slot id for each call.
  • 16832: NetworkStream(bool) constructor parameter should be "ownsSocket", not "owns_socket".
  • 16857: webClient.DownloadStringTaskAsync(foo).Start() is buggy.
  • 16951: [PCL] ReadOnlyDictionary is missing from the System.ObjectModel facade.
  • 16992: CancellationTokenSource.Cancel calls callbacks in reverse order.
  • 17009: File.Move() wont honor FileShare.ReadWrite | FileShare.Delete.
  • 17015: TaskScheduler.UnobservedTaskException raised for trapped exceptions.
  • 17023: Assertion at ../../../../../mono/mono/mini/method-to-ir.c:12854, condition `var->opcode == OP_REGOFFSET' not met
  • 17044: System.DateTime.ToLongDateString() returns wrong format in "en-CA" cultures
  • 17128: Seek on FileStream passed 2GB raises exception.
  • 17132: HttpRequestMessage fails in Xam.iOS and Xam.Android but works in .NET 4.5.
  • 17151: DateTimeFormat.FirstDayOfWeek returns wrong value.
  • 17410: Application crash on x86 emulator when user hover mouse over breakpoint.

API Changes

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.