Mono for Android 4.1.1
The 4.1.x series will be a series of alphas and betas leading up to the next big stable release, 4.2.
To see these updates, you have to switch to the Alpha channel in your IDE.
Visual Studio Users: You should be prompted with this update when you open a MFA project. You can also check manually in Tools > Options > Mono for Android.
MonoDevelop Users: You should be prompted to upgrade next time you open MonoDevelop, or you can use Help > Check for Updates. IDE support requires MonoDevelop 188.8.131.52.
Changes since 4.1.0
Layout DesignerWe are extremely pleased to introduce our graphical designer for producing Android layout files. This should make designing views for applications much easier.
Available for both MonoDevelop:
And Visual Studio:
We think this will be the best designer available for Android, so please file any bugs you find in the designer!
x86 emulator support
x86 emulators are now fuly supported in the trial and full MfA editions. This release includes fixes for library loading errors with logcat messages such as "java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library: 799 cannot locate 'atexit'..."
More event listener methods are bound to events
Previously, event listener methods would only be mapped to events if the event listener interface contained only one method. We now support event listener interfaces that have more than one method, generating one event per event listener interface method.
Improved API level support
Historically, Applications (and Debug Platform packages) would target a "minimum" API level, and could only be installed on targets running that API level or later. For example, if an Application was built against Android v2.3 (API level 10), it couldn't reliably run on a lower API level (e.g. API level 8) ("the MotionEvent problem").
This has been fixed so that it is now possible to sanely target an API level that is higher than the target's API level (e.g. target API 14 and run on API 8). Care must still be taken to only use types and members that exist on the target.
Earlier error checking
Build steps that used to be done at package creation time are now done as part of the normal build process, allowing errors to be flagged earlier. This includes Android Callable Wrapper generation and linking.
- Due to the event listener change, we had to replace ItemEventArgs which was used in some limited classes with AdapterView.ItemClickEventArgs which is used everywhere applicable. ItemEventArgs still exists, but since event signature has changed, your delegating methods need to be changed as well. For those who used signature-less lambdas it wouldn't affect.
- Various ToNative() methods were renamed to ToJniHandle(). Any .jar bindings may need to be regenerated and rebuilt.
- Additional int->enum changes.
- Various int to Color changes on properties, method return types, and constructor and method parameters.
- The various FooEventArgs.E properties are now named FooEventArgs.Event.
- The various FooEventArgs.V properties have been removed, and their value is now the sender parameter of the EventHandler delegate.
- Rename ViewAttachedToWindowEventArgs.V to ViewAttachedToWindowEventArgs.AttachedView and ViewDetachedFromWindowEventArgs.V to ViewDetachedFromWindowEventArgs.DetachedView.
- RemoteViews.SetViewVisibility() now takes ViewStates enum, not SystemUiFlags enum.
- Fix Java.Lang.Object deserialization for JSON in Release builds.
- Duplicate <uses-library/> elements within AndroidManifest.xml are removed.
- Emit <uses-sdk/> before <application/> within AndroidManifest.xml. (Failure to do so results in Android ignoring themes.)
- The Java.Lang.Throwable.StackTrace property no longer returns null.
- .jar binding is now more intelligent about int->enum mappings, and should greatly reduce the need to manually fixup new bindings.
- We now validate at build-time that the package name contains a period ('.'). If the package name doesn't contain a period, then Android will give a INSTALL_FAILED_INVALID_APK when installing the package.
- Mono for Andorid assemblies are now strong-named.
- Building a Release build twice in a row no longer generates javac errors.
- 210: Fixup package names so that Android will accept them
- 374: Paint.Color should be of type Android.Graphics.Color, not int.
- 2422: OpenTK.FrameEventArgs.set_Time crash
- 3641: Mono 2.11 make check failures on Cygwin
- 4441: Compatibility library should be called Support Packages
- 4485: Java Binding Library generates C# code that does not build
- 4592: [Export] + Release builds == TargetInvocationException
- 4594: API Demo exception thrown on Graphics->Alpha Bitmap on Release configuration
- 4605: Android.Widget.RemoteViews.SetViewVisibility does not exist for all API versions
Warning: Samsung shipped a broken kernel with Android 2.1, which is not able to support JIT compilation. If you possess a Galaxy-class device with Android 2.1, you will get unexpected results, this is caused by a kernel bug that breaks cache coherency, rendering any engine doing JIT compilation useless. Check with your manufacturer/carrier for an Android 2.2 update.