Test-project Mac OS
Test-project Mac OS
Close VS for Mac, start Xcode and create a test project which you run on a simulator. If it works try again in VS for Mac; Close VS for Mac, goto Xcode - Preferences - Accounts and download the manual profiles of your developer account. Try again in VS for Mac; Clean your project: In VS for Mac, goto Build - Clean All. Build my test project. Simply launch the command mvn package appbundle:bundle from the root of the directory TestProject. This will build the dmg file in the target folder with the JRE for Mac OS X included, in this particular case it will be called TestProject-0.1-SNAPSHOT.dmg. Test my test project. On the target Mac OS X. With Mpge is possible make trojan horse files for Microsoft Windows, Linux and Mac OS X 10.3 Panther, OS X 10.4 Tiger, OS X 10.5 Leopard and OS X Montain Lion 10.8.1 for all Mac OS X is possible make a trojan horse files contains a reverse shell into files.pkg and files.app. I used three real Mac OS.
-->GitHub Developer Community System requirements Blogs
Installing
- Visual Studio 2019 version 16.6 — Visual Studio Installer
- Visual Studio 2019 for Mac version 8.6 — Visual Studio for Mac Installerwith the Stableupdater channel
What's new in Xamarin.Android 10.3
Xamarin.Android 10.3 releases
- June 2, 2020 — Xamarin.Android 10.3.1.4in Visual Studio 2019 for Mac version 8.6.2.
- June 1, 2020 — Xamarin.Android 10.3.1.4in Visual Studio 2019 version 16.6.1.
- May 19, 2020 — Xamarin.Android 10.3.1.0in Visual Studio 2019 version 16.6 and Visual Studio 2019 for Mac version 8.6
Corresponding Visual Studio 2019 release notes
June 1 and 2, 2020 — Xamarin.Android 10.3.1.4
This version is included in the Visual Studio 2019 version 16.6.1 release andin the Stable updater channel of Visual Studio 2019 for Mac version 8.6.2.
Issues fixed in Xamarin.Android 10.3.1.4
Application and library build and deployment
- Developer Community 955972Starting in Xamarin.Android 10.3, error APT2258: not well-formed (invalidtoken) prevented using accented characters or other non-ASCII UTF-8characters in Android layout files that also contained custom views.
- Developer Community 955972Starting in Xamarin.Android 10.3, errors similar to error XARLC7000:System.Xml.XmlException: Invalid character in the given encoding couldprevent successful builds for certain project configurations, such as projectslocated in directory paths that contained accented characters or othernon-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 aJava type from managed type messages were logged to the application outputfor running apps, in some cases causing Visual Studio to become unresponsiveuntil the output window caught up.
- Developer Community 1030901,GitHub 4664:Starting in Xamarin.Android 10.3, localized resources from .resx files wereno longer deployed when building and deploying from within Visual Studio to anattached device or emulator. (In contrast, clean builds on the command lineworked as expected.)
May 19, 2020 — Xamarin.Android 10.3.1.0
This version is included in the Visual Studio 2019 version 16.6 release and inthe Stable updater channel of Visual Studio 2019 for Mac version 8.6.
In Xamarin.Android 10.3.1.0
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 casewhere 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 oremulator is available. - GitHub PR 3999:Allow
BuildApk
to merge new files into the previous APK instead ofgenerating a new APK from scratch for incremental builds where an Androidresource file has changed. This reduced the incremental build time for theBuildApk
step from about 4 seconds to about 0.7 seconds for a small test appwhen one Android resource file was changed between builds. - GitHub PR 4158:Update the default order of strategies used to detect installed packages tominimize time for modern devices. This can potentially save about 100milliseconds 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 callstoResolveAssemblyReference
from about 240 milliseconds to about 150milliseconds for incremental builds of a medium sized project. The samesavings also apply to the deployment step, resulting in an approximatecombined savings of 180 milliseconds for build and deployment of the testproject. - GitHub PR 4236:Use a
Lazy<T>
type to access the NuGet lock file so it is only loaded whenneeded, and remove some redundant logging messages. This reduced the totaltime for theResolveAssemblies
task from about 320 milliseconds to about 240milliseconds for incremental builds of a medium sized project. The samesavings also apply to the deployment step, resulting in an approximatecombined savings of 160 milliseconds for build and deployment of the testproject. - GitHub PR 4251:Reuse
MemoryStream
instances throughout the Xamarin.Android build targets tosave on allocations. This reduced the combined time for the_GenerateJavaStubs
,_ResolveLibraryProjectImports
, and_GeneratePackageManagerJava
targets from about 3.3 seconds to about 3.0seconds for an incremental build of a test app where theMainActivity
typewas modified between builds. - GitHub PR 4260:Remove unneeded calls to
string.Format()
during theLinkAssembliesNoShrink
task. This reduced the time for the task from about800 milliseconds to about 770 milliseconds for an initial clean build of asmall 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.Cecilmethods 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 secondsfor 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 toStreamWriter.Write()
. Thisreduced the total time forGenerateJavaStubs
from about 1.3 seconds to about0.9 seconds for an initial clean build of a small Xamarin.Forms test app. - GitHub PR 4308:Skip executing
keytool -list
during theSignAndroidPackage
target. Thissaved about 200 milliseconds for theSignAndroidPackage
target forincremental builds where a new APK was generated, such as after changing anAndroid resource. - GitHub PR 4316:Switch the
LinkAssembliesNoShrink
task to take advantage of the caching fromthe new Mono.Cecil wrapper methods introduced in Java.Interop GitHub PR570. This reduced the time for the task from about 710 millisecondsto about 700 milliseconds for an initial clean build of a small Xamarin.Formstest app. - GitHub PR 4320:Update the version of LibZipSharp used by the build tasks to 1.0.10, whichswitches several
byte[]
instances toSystem.Buffers.ArrayPool
instances tosave on allocations. This reduced the combined time for theResolveLibraryProjectImports
andBuildApk
tasks from about 5.3 seconds toabout 5.0 seconds for a small test Xamarin.Forms app on an initial cleanbuild. - GitHub PR 4395:Remove use of temporary files during the
ConvertResourcesCases
task. Thisreduced the time for the task from about 610 milliseconds to about 510milliseconds for a moderately large real-world project on initial clean buildsas well as on incremental builds with Android resource changes. - GitHub 4415:Starting in Xamarin.Android 10.2.100.7, System.NotSupportedException:Cannot create instance of type ... no Java peer type found caused certainapps to crash during launch after incremental deployments.
- Java.Interop GitHub PR 559:Switch from using
Assembly.GetName().Name
to usingAssembly.FullName
combined withstring.Substring()
inJavaNativeTypeManager.GetPackageName()
. This reduced the time forGenerateJavaStubs
from about 390 milliseconds to about 360 milliseconds foran 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 forGenerateJavaStubs
from about560 milliseconds to about 540 milliseconds for an initial clean build of asmall Xamarin.Forms test app. - Java.Interop GitHub PR 596:Use
File.Exists()
instead ofDirectoryGetFile()
in a few places. Thisreduced the time for theLinkAssembliesNoShrink
task from about 710milliseconds to about 430 milliseconds for a small test Xamarin.Forms app onan initial clean build.
App startup performance
- GitHub PR 3958:Skip scanning for .exe files during app startup because Xamarin.Android appsonly expect .dll assemblies. This reduced the
Runtime.init()
phase ofapplication startup for a small test app from about 165 milliseconds to about164 milliseconds on a Google Pixel 3 XL device and from about 530 millisecondsto about 450 milliseconds on an x86 emulator using HAXM. - GitHub PR 3992:Optimize the storage format of the per-application Java-to-managed andmanaged-to-Java type mappings to allow more efficient lookups. This reducedthe time to display the first screen of a small test Xamarin.Forms app fromabout 800 milliseconds to about 790 milliseconds for a Release configurationbuild on a Google Pixel 3 XL device.
- GitHub PR 4302:Avoid unneeded calls to
GetCustomAttribute()
during app startup for thecommon case where an app has no types decorated withJniAddNativeMethodRegistrationAttribute
. Additionally, instead of using amanaged method to propagate uncaught exceptions from Java, use a Java methodthat calls into the unmanaged Xamarin.Android runtime. These changes reducedthe time to display the first screen of a small test Xamarin.Forms app fromabout 730 milliseconds to about 700 milliseconds for a Release configurationbuild on a Google Pixel 3 XL device. - Java.Interop GitHub PR 541Add
[MethodImpl (MethodImplOptions.AggressiveInlining)]
to Java.Interopmethods and properties that are called many times during Xamarin.Forms appstartup. This reduced the time to display the first screen of a blankXamarin.Forms app from about 560 milliseconds to about 540 milliseconds for aRelease configuration build on a Google Pixel 3 XL device. - Java.Interop GitHub PR 555:Implement and switch to a new
JniTypeManager.GetTypeSignature()
method thatreturns aJniTypeSignature
instance instead of anIEnumerable<JniTypeSignature>
. This reduced the time to display the firstscreen of a small test Xamarin.Forms app from about 760 milliseconds to about750 milliseconds for a Release configuration build on a Google Pixel 3 XLdevice. It also reduced the number of object allocations from about 9300 toabout 8900. - Java.Interop GitHub PR 557:Remove unneeded calls to
IntrospectionExtensions.GetTypeInfo()
now thatJava.Interop is a .NET Standard library rather than a PCL. This reduced thetime to display the first screen of a small test Xamarin.Forms app from about755 milliseconds to about 753 milliseconds for a Release configuration buildon a Google Pixel 3 XL device. - Java.Interop GitHub PR 574:Skip calling
GetCustomAttribute()
in cases whereJniTypeManager.GetSimpleReference()
can be used instead. - Java.Interop GitHub PR 582:Remove a static array initialization from
JniRuntime
and an array iterationduringJniRuntime.JniTypeManager.GetTypeSignature()
, and leverageType.GetTypeCode()
for faster lookups of builtin types. - Mono GitHub PR 19102:Use
GArray
instead ofGList
when getting custom attributes from an image.This reduces the number of memory allocations during app startup for astandard Xamarin.Forms app, which should improve startup times by severalmilliseconds.
Android resource editing performance
- GitHub PR 3674:Correct the
Inputs
for the_ManagedUpdateAndroidResgen
target so that thetarget is skipped as expected during incremental design-time builds.
Mono Framework version update to 6.12
Xamarin.Android now uses theMono 6.12runtime and class librariesat 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 ofAndroid 11 from Google. See the Android 11 DeveloperPreview documentation for additional information about thebehavior and API changes in this new Android version. To try the bindings forthe new APIs in a Xamarin.Android project, set Compile using Android version:(Target Framework) to Android 10.0.99 (R) under the Application tab ofthe Visual Studio project property pages. This sets theTargetFrameworkVersion
property to v10.0.99
in the .csproj file:
New features
These bindings take advantage of C# 8.0's support for default and staticinterface members to provide C# interface APIs that more closely match theoriginal Android APIs.
For example, in the Android.Views.TextClassifiers
namespace,TextClassifier.HintTextIsEditable
is now available asITextClassifier.HintTextIsEditable
, and the oldTextClassifier.HintTextIsEditable
field is marked [Obsolete]
.
Note
An older set of bindings for interface constants were also available inConsts classes like TextClassifierConsts
in earlier target frameworkversions. Those classes were marked [Obsolete]
for several years. Theyhave been removed completely for the Android 10.0.99 (R) target frameworkversion. Project authors are encouraged to switch to the new interfacemembers like ITextClassifier.HintTextIsEditable
at their earliestconvenience.
R8 configured to suppress common build errors
Xamarin.Android now configures R8 to skip emitting errors for Java dependencywarnings such as:
This allows a more gradual transition to R8, particularly for projects that areusing R8 for multidex only and not code shrinking.
Although these R8 warnings will no longer cause the build to fail, projectauthors are encouraged to address the warnings at their earliest convenience andthen set R8 back to its original stricter behavior. To restore the originalbehavior, set the AndroidR8IgnoreWarnings
MSBuild property to false
in the.csproj file:
Example: How to solve Missing class: org.apache.http.client
Best solution
Update any NuGet packages or Java dependencies that use the Apache HTTP clientto newer versions that use java.net.HttpURLConnection
instead. This is thebest solution because starting in Android 6.0 Marshmallow (API level 23), theApache HTTP client is deprecated in favor of the more efficientHttpURLConnection
.
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 tonewer versions that include a UsesLibraryAttribute
for org.apache.http.legacy:
NuGet package authors who cannot yet update all Java dependencies to useHttpURLConnection
are encouraged to add this attribute to their projects assoon as possible.
This attribute automatically generates the following element under the<application>
node of AndroidManifest.xml for any app that references theNuGet package:
Fallback solution
If updated NuGet package versions are not yet available with the attribute, thenadd the same UsesLibraryAttribute
directly to the application project instead:
Background information
The Missing class: org.apache.http.client warning indicates that the app has aJava dependency on the Apache HTTP client. Starting in Android 6.0 Marshmallow(API level 23), that client was deprecated and moved outof android.jar into its own org.apache.http.legacy.jar library. As aresult, applications that use Apache HTTP client on Android 6.0 or higher willonly be able to call the APIs successfully if they declare the use oforg.apache.http.legacy via a <uses-library>
element inAndroidManifest.xml. Otherwise, the API calls will fail with exceptionssimilar to:
Example: How to solve Missing class: java.lang.ClassValue
Solution
It is typically safe to suppress this warning:
Add a new text file to the project, named for example proguard-rules.pro.
Set the contents of the file to:
Edit the .csproj file in a text editor and add
--pg-conf proguard-rules.pro
to theAndroidR8ExtraArguments
MSBuild property, forexample by adding the following lines:(If the project is configured to use R8 for code shrinking, an easier optionis to set the Build Action of proguard-rules.pro toProguardConfiguration in the Visual Studio Properties window, butthat approach is not yet supported when using R8 for multidex only.)
Background information
The Missing class: java.lang.ClassValue warning indicates that the appreferences a library that uses java.lang.ClassValue
. Typically this happenswhen the app references a library that was built to run on multiple Javaplatforms. On Android, the java.lang.ClassValue
type does not exist in thejava.lang package.
One known scenario that produces this warning is when an app references theXamarin.Firebase.Firestore NuGet package, which depends on the cross-platformGoogle Guava library. Guava uses java.lang.ClassValue
, but it only uses it onplatforms 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 therule to their app projects directly.
More thorough clean of obj directory between builds
In previous versions, Xamarin.Android reserved a costlier, more completeincremental clean of the intermediate output directory for special scenarioswhere a NuGet package changed or where the AndroidPackageNamingPolicy
MSBuildproperty changed. Xamarin.Android 10.3 expands this behavior to perform themore 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 fullclean by hand after changing one of these properties, such as after updating toa 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. Asin the past, to get the best incremental build times, avoid changing theseproperties back and forth too much between builds.
Compatibility with embedded debug information
The Mono Framework version in this Xamarin.Android version adds compatibilityfor reading embedded debugging information from assemblies built with Build >Advanced > Debugging information set to Embedded in the Visual Studioproject property pages. This corresponds to the embedded
value for the DebugType
MSBuild property in the .csproj file:
See the symbol embedding design documentation for moreinformation.
Support for Android App Bundle configuration files
The Android App Bundle publishing format includes an option to customize certaindetails about how APKs are generated from the bundle, such as whether or not aseparate configuration APK is generated for each set of language resources,screen density resources, and ABI libraries. See the documentation aboutBundleConfig.json files to learn more. Xamarin.Androidnow 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 thefollowing to the .csproj file:
Note
Xamarin.Android configures some of the settings automatically, including thelist of file extensions to leave uncompressed.
Stream.Seek() for file streams from Android APIs
Until now, Stream.Seek()
and related properties like Stream.Position
alwaysthrew NotSupportedException
on Stream
instances returned from Android APImethods. In Xamarin.Android 10.3, Stream.Seek()
and the other relatedproperties are now available on these Stream
instances when the underlyingJava types inherit from FileInputStream
.
Localized errors and warnings for builds
Many of the errors and warnings in the Xamarin.Android build tasks now providelocalized messages that match the region and language settings of the buildenvironment.
Java.Interop nullable reference types compatibility
The Java.Interop assembly has been updated for compatibility with C# 8.0nullable reference type checks. Any projects that are using typesdirectly from the Java.Interop assembly can now optionally place that code in anullable context to take advantage of additional compiler nullability checks.Most Xamarin.Android projects only use the Java.Interop assembly indirectly, sothis 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 beenupdated 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 to29.0.2. This version can be changed per-project if needed via theAndroidSdkBuildToolsVersion
MSBuild property.
The default Android SDK Platform-Tools version has been updated from 28.0.0 to29.0.5. This version can be changed per-project if needed via theAndroidSdkPlatformToolsVersion
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:
In the past, this configuration was allowed, but now only the R8 code shrinkeris supported for use with the D8 DEX compiler.
To resolve this error, update the Code shrinker setting in the Visual Studioproject property pages to r8. This corresponds to the r8
value for theAndroidLinkTool
MSBuild property in the .csproj file:
Note
R8 might in some cases produce new build warnings or errors compared toProGuard, so the ProGuard rules for the project might require updates afterthis change.
XA0122 and CS0618 warnings for deprecated Java.Interop.DoNotPackageAttribute
Any app project that references a Xamarin.Android bindings library containinguses of Java.Interop.DoNotPackageAttribute
will now get a XA0122 buildwarning:
Similarly, any library project that includes a use of [assembly: Java.Interop.DoNotPackageAttribute]
will now get a CS0618 build warning:
Java.Interop.DoNotPackageAttribute
will be removed in a future release. NuGetpackage authors are encouraged to transition away from it at their earliestconvenience. The recommended approach is to include the external library as aseparate file within the NuGet package and add a .props file in both thebuild and buildTransitive directories of the NuGetpackage that sets the library as a AndroidExternalJavaLibrary
item forconsuming app projects. For example, if the external library is includedalongside the .props file in the build and buildTransitive directories,then the contents of the .props file can be:
CS0619 error for obsolete constant fields
Certain previously deprecated constant fields in the Android API bindings havebeen updated from [Obsolete]
to [Obsolete(error:true)]
. These types willnow 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
, theerror message is:
To resolve this example error, switch the type toAndroid.Content.TrimMemory.Background
.
Bindings projects exclusion of private nested types
Previously, Xamarin.Android bindings projects generated public bindings for allnested Java types, even when the types had private or package-privatevisibility. Bindings projects now respect private visibilities on nested typesand no longer generate bindings for those types.
Note
This change in behavior can result in new C# compiler errors for bindingsprojects, such as:
To restore any needed missing types, adjust the visibilities by adding rulessimilar the following to the TransformsMetadata.xml file:
Removal of AndroidExplicitCrunch feature
In previous Xamarin.Android versions, setting the AndroidExplicitCrunch
MSBuild property to true
would configure the build tocrunch PNG drawable resources using a separate MSBuild taskbefore passing them to AAPT.
This feature was never compatible with projects configured to use AAPT2 and wasautomatically disabled in those projects. For projects configured to use theolder AAPT tool, this feature could cause builds to rerun AAPT on every build.Due to these limitations, this feature has now been removed fromXamarin.Android. The AndroidExplicitCrunch
MSBuild property is now ignored.Project authors who added this property to their .csproj files in the past cannow remove it.
Removal of F# Resource.designer.fs file support
F# Xamarin.Android projects now generate Resource.designer.cs files instead ofResource.designer.fs files. The recommended way to consume these files is tothe install the Xamarin.Android.FSharp.ResourceProviderNuGet package, which surfaces F# types for the content in the .cs file.
See the DisplayPlatformInfo sample for an example of howto use Xamarin.Android.FSharp.ResourceProvider.
Note
Xamarin.Android.FSharp.ResourceProvider does not supportResource.designer.cs files located in the intermediate output directory, sogeneration of resource designer files in the intermediate output directory isnow disabled for F# projects.
Removal of keystore certificate fingerprint from build output
The performance improvement from GitHub PR 4308 that skips executingkeytool -list
during the build means that the SHA-1 certificate fingerprint nolonger appears in the build output. To determine certificate fingerprints inthis version, follow the steps from the Finding your Keystore'sSignature guide instead.
Removal of .exe reference support
To improve performance, Xamarin.Android no longer probes for .exe files duringapp startup.
Projects must now use .dll assemblies for all dependencies. Compatibledependency types include .NET Standard libraries, Xamarin.Android classlibraries, Xamarin.Android binding libraries, shared projects, and portableclass 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 typesor custom build targets.
Also, the build process has intentionally skipped .exe files when packagingAPKs since as far back as Xamarin.Android 9.4, so this new Xamarin.Android 10.3behavior at run time is unlikely to affect app behavior for project authorsupgrading 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' isincompatible with attribute ChildLayout (attr) enum prevented buildingprojects successfully if they contained custom attribute names ending with theword Layout.
- Developer Community 888836:ADB1000: Deployment failed System.ArgumentOutOfRangeException ... Parametername: length could prevent successful deployment on certain devices.
- Developer Community 917114:error MSB4018: The 'CreateManagedLibraryResourceArchive' task failedunexpectedly ... System.ArgumentOutOfRangeException: startIndex cannot belarger than length of string. caused builds to abort for Xamarin.Androidclass library projects that included
AndroidAsset
items with paths outsideof the project directory. - GitHub 2654:Directory objReleaseandroidassets contains *.dll but no debug symbolsfile was found. warnings were shown by default in Release configurationbuilds for apps that referenced libraries without debug symbols. Thesewarnings were often caused by NuGet packages and so could not be resolved byapp project authors. These warnings have been demoted to informationalmessages 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 couldprevent apps built with Code shrinker set to ProGuard or r8 fromrunning successfully unless custom ProGuard rules were added to the project byhand. In Xamarin.Android 10.3, projects configured to use AAPT2 now pass the
--proguard
option to AAPT2 to generate default ProGuard rules that moreclosely match the defaults for Android Studio projects, removing the need toadd custom rules for common scenarios like theFitWindowsLinearLayout
typefrom 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'stemporary directory after the build. - GitHub PR 4340:error XA0031: Java SDK 1.8 or above is required when targetingFrameworkVersion did not yet mention the full MSBuild property name
TargetFrameworkVersion
. - GitHub PR 4357:error XA0003 and error XA0004 messages did not yet mentionAndroidManifest.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 errorMSB6006: 'java.exe' exited with code 2 was shown if the
AndroidKeyStore
MSBuild property wastrue
and theAndroidSigningKeyStore
property was setto a file that did not exist. - GitHub PR 4387:error XA1010: Invalid application placeholders... did not yet mention theassociated
AndroidManifestPlaceholders
MSBuild property or list the currentvalue of the property. - GitHub 4409:; expected prevented using comma-delimited lists in
Aliases
MSBuild itemmetadata on Xamarin.Android library project references. - GitHub PR 4422:error APT0001: unknown option... was inaccurate for cases where an optionwas misspelled, and it did not yet mention the relevant MSBuild properties.
- GitHub PR 4444:System.IO.IOException: The directory is not empty could sometimes preventthe
RemoveDirFixed
task from removing temporary build directories. The tasknow 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 preventeddeploying successfully for certain projects configured to use the DX DEXcompiler.
Application behavior on device and emulator
- GitHub 4110:Unable to get provider mono.MonoRuntimeProvider_1:java.lang.ClassNotFoundException prevented apps containing broadcastreceivers from launching successfully if they were built with ProGuard or R8enabled.
Application Mono Framework behavior on device and emulator
- GitHub 1368,GitHub 2049,GitHub 2518,GitHub 3035,GitHub 3905,Mono GitHub 14282,Mono GitHub PR 18239:System.ObjectDisposedException: Cannot access a disposed object. ... atJava.Interop.JniPeerMembers.AssertSelf could cause apps to exit unexpectedly.
- Mono GitHub 9314:Assertion at ... sgen-tarjan-bridge.c:1140, condition `xref_count xref_index' not met could cause apps to exit unexpectedly.
- Mono GitHub 18917:Explicit implementations of interface properties were ignored if theinterfaces provided default implementations.
Design-time build
Test-project Mac Os Catalina
- GitHub 2413:The
_ManagedUpdateAndroidResgen
target was running during every incrementaldesign-time build.
Bindings projects
- GitHub PR 4385:You have Jar libraries, lint.jar, lint.jar, ... that have the identical namewith inconsistent file contents could prevent apps from using custom bindingslibraries for certain Java libraries. This was discovered while preparing newversions of the Xamarin.AndroidX bindings libraries.
- Java.Interop GitHub 519:error CS1001: Identifier expected prevented building binding projects forJava 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 preventedbuilding bindings projects for Java libraries that contained explicitinterface property implementations.
- Java.Interop GitHub 571:Kotlin: Hiding internal ... method caused missing bindings for public Kotlinmethods in cases where the method names were the same as the names of privateproperties 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 beaccessed from outside package when attempting to use the bindings.
Thank you
A big Thank You! to community members who contributed improvements in thisrelease:
- Andrey Kurdyumov (@kant2002),GitHub PR 3848:Use HTTPS protocol instead of Git protocol for xamarin-android repositorysubmodules that were using the Git protocol.
- @mathieubourgeois,GitHub PR 3915:Add support for Android App Bundle configuration files.
- Bruno Garcia (@bruno-garcia),GitHub PR 4004:Remove an unused libzip dependency from the xamarin-android source build.
- giga bokuchava (@mister-giga),GitHub PR 4120:Experiment with providing an implicit operator to allow assigning
Android.Graphics.Color
instances fromint
literals. - Christopher Atlan (@catlan),GitHub PR 4197:Add implementations of
Stream.Seek()
and other related properties forStream
instances from Android APIs where the original Java return typesinherit fromFileInputStream
.
Feedback
Test-project Mac Os Download
Your feedback is important to us. If there are any problems with this release, check ourGitHub Issues,Xamarin.Android Community Forums andVisual Studio Developer Communityfor existing issues. For new issues within the Xamarin.Android SDK, please report aGitHub Issue.For general Xamarin.Android experience issues, let us know via theReport a Problemoption found in your favorite IDE under Help > Report a Problem.
Open source
Xamarin.Android 10.3 is based on the open-source Xamarin.Android repositories:
Test-project Mac Os X
- 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
xamarin/xamarin-android
Gitter channel.
Test-project Mac OS