xamarin / androidx Goto Github PK
View Code? Open in Web Editor NEWAndroidX bindings for .NET for Android
License: MIT License
AndroidX bindings for .NET for Android
License: MIT License
16.6
Windows
Xamarin.Android.Support.Media.Compat: 28.0.0.3
Xamarin.AndroidX.Media: 1.1.0
Noticeable in https://github.com/toggl/mobileapp
The type Android.Support.V4.Media.Session.MediaSessionCompat.IOnActiveChangeListenerImplementor
is in both Xamarin.AndroidX.Media.dll
and Xamarin.Android.Support.Media.Compat.dll
.
Among other problems this causes the Android designer to bark at the situation and disable custom controls rendering.
Since the type is autogenerated by Xamarin.Android there is likely a corner case somewhere.
After upgrade from Xamarin.Forms 4.4.0.991640 to 4.5.282-pre4 I noticed that when
<BundleAssemblies>True</BundleAssemblies>
app crash on start with exception
System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.AndroidX.AppCompat.Resources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
My working setup for release in 4.4 is
<AndroidLinkMode>Full</AndroidLinkMode>
<AotAssemblies>True</AotAssemblies>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<EnableLLVM>True</EnableLLVM>
<BundleAssemblies>True</BundleAssemblies>
in 4.5 everything works fine only if
<AndroidLinkMode>Full</AndroidLinkMode>
<AotAssemblies>True</AotAssemblies>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<EnableLLVM>True</EnableLLVM>
<BundleAssemblies>False</BundleAssemblies>
<AndroidLinkMode>Full</AndroidLinkMode>
<AotAssemblies>True</AotAssemblies>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<EnableLLVM>True</EnableLLVM>
<BundleAssemblies>True</BundleAssemblies>
App starts.
App crash with System.IO.FileNotFoundException exception.
I am seeing the following build error when using the migration tool
"/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/TestDebug/temp/AndroidXMigrationFalse/UnnamedProject.csproj" (Build;SignAndroidPackage target) (1:7) ->
(_AndroidXJetifyEmbeddedFiles target) ->
/Users/dean/.nuget/packages/xamarin.androidx.migration/1.0.0-preview04/build/Xamarin.AndroidX.Migration.targets(279,9): error : Method not found: Xamarin.AndroidX.Migration.MigrationPair Xamarin.AndroidX.Migration.MigrationPair.op_Implicit(System.ValueTuple`2<string, string>) [/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/TestDebug/temp/AndroidXMigrationFalse/UnnamedProject.csproj]
/Users/dean/.nuget/packages/xamarin.androidx.migration/1.0.0-preview04/build/Xamarin.AndroidX.Migration.targets(279,9): error : at System.Collections.Generic.List`1[T].AddEnumerable (System.Collections.Generic.IEnumerable`1[T] enumerable) [0x00059] in <b814b509d4ad406fb40c6c93e38929e7>:0 [/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/TestDebug/temp/AndroidXMigrationFalse/UnnamedProject.csproj]
/Users/dean/.nuget/packages/xamarin.androidx.migration/1.0.0-preview04/build/Xamarin.AndroidX.Migration.targets(279,9): error : at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00062] in <b814b509d4ad406fb40c6c93e38929e7>:0 [/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/TestDebug/temp/AndroidXMigrationFalse/UnnamedProject.csproj]
/Users/dean/.nuget/packages/xamarin.androidx.migration/1.0.0-preview04/build/Xamarin.AndroidX.Migration.targets(279,9): error : at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <549f46d1789f4a51aa5fa1e7d715fe0d>:0 [/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/TestDebug/temp/AndroidXMigrationFalse/UnnamedProject.csproj]
/Users/dean/.nuget/packages/xamarin.androidx.migration/1.0.0-preview04/build/Xamarin.AndroidX.Migration.targets(279,9): error : at Xamarin.AndroidX.Migration.BuildTasks.JetifyFiles.Execute () [0x000f1] in <c3268ca5c57e420e808ebcfa18e95191>:0 [/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/TestDebug/temp/AndroidXMigrationFalse/UnnamedProject.csproj]
Mono Version: Mono JIT compiler version 6.4.0.198 (2019-06/fe64a4765e6 Wed Sep 18 14:14:51 EDT 2019)
XamarinAndroid: Master.
I am attaching builds logs and the complete zipped directory of a test project.
after migrating it is the designer doesn't render controls from Android Support Library, instead youre asked to perform a nuget restore which does nothing. please fix this soon.
AndroidX
MacOSX builds on Azure DevOps
Error
An error occurred when executing task 'migration-tests'.
Details
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(514,3): error XA0121: Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author. [/Users/runner/runners/2.164.6/work/1/s/tests/AndroidXMigrationTests/Aarxercise.Old.Support/Aarxercise.Old.Support.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(514,3): error XA0121: Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Java.Interop.JavaLibraryReferenceAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author. [/Users/runner/runners/2.164.6/work/1/s/tests/AndroidXMigrationTests/Aarxercise.Old.Support/Aarxercise.Old.Support.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(514,3): error XA0121: Assembly 'Xamarin.Android.Support.v4' is using '[assembly: Android.IncludeAndroidResourcesFromAttribute]', which is no longer supported. Use a newer version of this NuGet package or notify the library author. [/Users/runner/runners/2.164.6/work/1/s/tests/AndroidXMigrationTests/Aarxercise.Old.Support/Aarxercise.Old.Support.csproj]
We'd like to use the new AndroidX support for BiometricPrompt (so we don't need to provide a custom UI on devices < Android.P) , but I don't see the equivalent listed in the preview packages available for Android X.
I think you're focusing on the port of existing support libraries first, but this one is brand new and did not have a support library package.
After following the directions and installing the necessary nugets I was told to install, we still cannot compile. We get a ton of errors for "Original attribute defined here."
Any suggestions? The errors do not say where they are being spawned from. They started coming up about the same time we added the AndroidX.AppCompat nuget.
Any help would be appreciated.
Any chance to update Xamarin.AndroidX.Biometrics? The latest version 1.0.1 contains a lot of important bugfixes! I thought after switching to AndroidX we would get the latest bindings more regularly, but apparently that doesn't seem to be the case (yet?)
https://developer.android.com/jetpack/androidx/releases/biometric#1.0.1
lint.jar
)jar-libraries-with-identical-names-and-inconsistent-contents-lint-jar.md
Blocking issue for newest AndroidX updates (also needed for GPS-FB with AndroidX prerelease)
dotnet cake -t=clean && dotnet cake -t=ci
Building samples results in following error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1092,3):
error :
You have Jar libraries,
lint.jar,
lint.jar,
lint.jar,
that have the identical name with inconsistent file contents.
Please make sure to remove any conflicting libraries in EmbeddedJar, InputJar and AndroidJavaLibrary.
[samples/BuildAll/BuildAll/BuildAll.csproj]
3 lint.jar files are dependencies for 3 artifacts:
$ find . -type f -name lint.jar -exec ls -al {} \;
33755 Feb 1 1980 ./externals/androidx.fragment/fragment/lint.jar
20773 Feb 1 1980 ./externals/androidx.work/work-runtime/lint.jar
10997 Feb 1 1980 ./externals/androidx.annotation/annotation-experimental/lint.jar
Attempt No.1 - remove physically 3 lint.jar
files from externals/
folder:
Link:
https://github.com/xamarin/AndroidX/blob/master_based_updates_202002/build.cake#L224-L254
Code:
Task ("binderate")
.IsDependentOn("binderate-config-verify")
.Does (() =>
{
var configFile = MakeAbsolute(new FilePath("./config.json")).FullPath;
var basePath = MakeAbsolute(new DirectoryPath ("./")).FullPath;
// Run the dotnet tool for binderator
RunProcess("xamarin-android-binderator",
$"--config=\"{configFile}\" --basepath=\"{basePath}\"");
// format the targets file so they are pretty in the package
var targetsFiles = GetFiles("generated/**/*.targets");
var xmlns = (XNamespace)"http://schemas.microsoft.com/developer/msbuild/2003";
foreach (var targets in targetsFiles) {
var xdoc = XDocument.Load(targets.FullPath);
xdoc.Save(targets.FullPath);
}
// different lint.jar files in artifacts causing R8 errors
FilePathCollection files = GetFiles("./externals/**/lint.jar");
foreach(FilePath file in files)
{
Information($"Deleting: {file}");
if (cleanup)
{
DeleteFile(file);
}
}
});
Attempt No.2 was to change binderator Razor project template
Link:
Code:
@if (@Model.MavenArtifacts.Count > 0) {
<ItemGroup>
@foreach (var art in @Model.MavenArtifacts)
{
if (art.MavenArtifactPackaging == "aar")
{
<InputJar Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)\classes.jar" />
<!-- For those artifacts with lib/ folder -->
<InputJar
Condition="Exists('..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)\libs\')"
Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)\libs\*.jar"
/>
}
else
{
<InputJar Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId).jar" />
}
<InputJar Remove="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)\lint.jar" />
<InputJar Remove="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)\**\lint.jar" />
}
</ItemGroup>
}
With both attempts - issue still persists.
Make sure all projects with a .targets and/or .props file also use the buildTransitive
folder.
https://github.com/NuGet/Home/wiki/Allow-package--authors-to-define-build-assets-transitive-behavior
Xamarin.Android
Version: 10.1.3.7 (Visual Studio Community)
Commit: xamarin-android/d16-4/d66aed0
Mac OS X 10.15.2
Darwin 19.2.0 Darwin Kernel Version 19.2.0
Xamarin.AndroidX.Lifecycle.Common(2.1.0-preview06)
also tried (2.1.0-rc1)
JARTOXML: Warning J2X9001: Couldn't load class ...: java.lang.NoClassDefFoundError: androidx/lifecycle/LifecycleOwner (J2X9001)
JARTOXML: Warning J2XA006: missing class error was raised while reflecting ... : androidx/lifecycle/LifecycleOwner (J2XA006)
Create a xamarin bindings project and bind java lib using jar2xml
Microsoft Visual Studio Professional 2019
Version 16.4.2
VisualStudio.16.Release/16.4.2+29613.14
Microsoft .NET Framework
Version 4.8.03752
Xamarin.Android SDK 10.1.1.0 (d16-4/f2c9364)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: bef1e63
Java.Interop: xamarin/java.interop/d16-4@c4e569f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@46204c4
Xamarin.Android Tools: xamarin/xamarin-android-tools/master@9f4ed4b
Windows 10 (1909)
Xamarin.AndroidX.Preference 1.1.0-rc1
As described in issue #19, the originally explicit Preference return values for the "findPreference" methods were bound as Java.Lang.Object since preview03. A fix was made to the transform metadata in commit 7a839db but release 1.1.0-rc1 following this fix still has the generic return type binding. As requested in the original issue I have opened a new issue on this.
Excerpt from PreferenceFragmentCompat object metadata:
public Java.Lang.Object FindPreference(string key);
[JavaTypeParameters(new[] { "T extends androidx.preference.Preference" })]
[Register("findPreference", "(Ljava/lang/CharSequence;)Landroidx/preference/Preference;", "GetFindPreference_Ljava_lang_CharSequence_Handler")]
public virtual Java.Lang.Object FindPreference(ICharSequence key);
Hello there,
It seems that the [Lifecycle.Event.OnStart]
, [Lifecycle.Event.OnStop]
and other from the AndroidX.Lifecycle
namespace have their java annotation counterparts set to the old libraries.
Found this while testing the migration in the Toggl app, we are using the old [Lifecycle.Event.OnStart]
, [Lifecycle.Event.OnStop]
here:
https://github.com/toggl/mobileapp/blob/d79af0ab5522a325046baf19b4616cb086b1bc71/Toggl.Droid/Startup/TogglApplication.cs#L83-L99
Test branch: https://github.com/toggl/mobileapp/tree/doivid/androidx-migration-test
After migrating, we get this error while building:
TogglApplication.java(34, 25): error: package android.arch.lifecycle does not exist
@android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_START)
TogglApplication.java(43, 25): error: package android.arch.lifecycle does not exist
@android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_STOP)
Checking the generated source code, I found this:
namespace AndroidX.Lifecycle
{
[Register("androidx/lifecycle/Lifecycle", DoNotGenerateAcw = true)]
public abstract class Lifecycle : Java.Lang.Object
{
...
[Register("androidx/lifecycle/Lifecycle$Event", DoNotGenerateAcw = true)]
public sealed class Event : Java.Lang.Enum
{
internal new static readonly JniPeerMembers _members = (JniPeerMembers) new XAPeerMembers("androidx/lifecycle/Lifecycle$Event", typeof (AndroidX.Lifecycle.Lifecycle.Event));
[Register("ON_ANY")]
public static AndroidX.Lifecycle.Lifecycle.Event OnAny
{
get
{
return Java.Lang.Object.GetObject<AndroidX.Lifecycle.Lifecycle.Event>(AndroidX.Lifecycle.Lifecycle.Event._members.StaticFields.GetObjectValue("ON_ANY.Landroidx/lifecycle/Lifecycle$Event;").Handle, JniHandleOwnership.TransferLocalRef);
}
}
[Register("ON_CREATE")]
public static AndroidX.Lifecycle.Lifecycle.Event OnCreate
{
get
{
return Java.Lang.Object.GetObject<AndroidX.Lifecycle.Lifecycle.Event>(AndroidX.Lifecycle.Lifecycle.Event._members.StaticFields.GetObjectValue("ON_CREATE.Landroidx/lifecycle/Lifecycle$Event;").Handle, JniHandleOwnership.TransferLocalRef);
}
}
[Register("ON_DESTROY")]
public static AndroidX.Lifecycle.Lifecycle.Event OnDestroy
{
get
{
return Java.Lang.Object.GetObject<AndroidX.Lifecycle.Lifecycle.Event>(AndroidX.Lifecycle.Lifecycle.Event._members.StaticFields.GetObjectValue("ON_DESTROY.Landroidx/lifecycle/Lifecycle$Event;").Handle, JniHandleOwnership.TransferLocalRef);
}
}
[Register("ON_PAUSE")]
public static AndroidX.Lifecycle.Lifecycle.Event OnPause
{
get
{
return Java.Lang.Object.GetObject<AndroidX.Lifecycle.Lifecycle.Event>(AndroidX.Lifecycle.Lifecycle.Event._members.StaticFields.GetObjectValue("ON_PAUSE.Landroidx/lifecycle/Lifecycle$Event;").Handle, JniHandleOwnership.TransferLocalRef);
}
}
[Register("ON_RESUME")]
public static AndroidX.Lifecycle.Lifecycle.Event OnResume
{
get
{
return Java.Lang.Object.GetObject<AndroidX.Lifecycle.Lifecycle.Event>(AndroidX.Lifecycle.Lifecycle.Event._members.StaticFields.GetObjectValue("ON_RESUME.Landroidx/lifecycle/Lifecycle$Event;").Handle, JniHandleOwnership.TransferLocalRef);
}
}
[Register("ON_START")]
public static AndroidX.Lifecycle.Lifecycle.Event OnStart
{
get
{
return Java.Lang.Object.GetObject<AndroidX.Lifecycle.Lifecycle.Event>(AndroidX.Lifecycle.Lifecycle.Event._members.StaticFields.GetObjectValue("ON_START.Landroidx/lifecycle/Lifecycle$Event;").Handle, JniHandleOwnership.TransferLocalRef);
}
}
[Register("ON_STOP")]
public static AndroidX.Lifecycle.Lifecycle.Event OnStop
{
get
{
return Java.Lang.Object.GetObject<AndroidX.Lifecycle.Lifecycle.Event>(AndroidX.Lifecycle.Lifecycle.Event._members.StaticFields.GetObjectValue("ON_STOP.Landroidx/lifecycle/Lifecycle$Event;").Handle, JniHandleOwnership.TransferLocalRef);
}
}
internal new static IntPtr class_ref
{
get
{
return AndroidX.Lifecycle.Lifecycle.Event._members.JniPeerType.PeerReference.Handle;
}
}
public override JniPeerMembers JniPeerMembers
{
get
{
return AndroidX.Lifecycle.Lifecycle.Event._members;
}
}
protected override IntPtr ThresholdClass
{
get
{
return AndroidX.Lifecycle.Lifecycle.Event._members.JniPeerType.PeerReference.Handle;
}
}
protected override System.Type ThresholdType
{
get
{
return AndroidX.Lifecycle.Lifecycle.Event._members.ManagedPeerType;
}
}
internal Event(IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer)
{
}
[Register("valueOf", "(Ljava/lang/String;)Landroidx/lifecycle/Lifecycle$Event;", "")]
public static unsafe AndroidX.Lifecycle.Lifecycle.Event ValueOf(string name)
{
IntPtr jobject = JNIEnv.NewString(name);
try
{
JniArgumentValue* parameters = stackalloc JniArgumentValue[1];
parameters[0] = new JniArgumentValue(jobject);
return Java.Lang.Object.GetObject<AndroidX.Lifecycle.Lifecycle.Event>(AndroidX.Lifecycle.Lifecycle.Event._members.StaticMethods.InvokeObjectMethod("valueOf.(Ljava/lang/String;)Landroidx/lifecycle/Lifecycle$Event;", parameters).Handle, JniHandleOwnership.TransferLocalRef);
}
finally
{
JNIEnv.DeleteLocalRef(jobject);
}
}
[Register("values", "()[Landroidx/lifecycle/Lifecycle$Event;", "")]
public static unsafe AndroidX.Lifecycle.Lifecycle.Event[] Values()
{
return (AndroidX.Lifecycle.Lifecycle.Event[]) JNIEnv.GetArray(AndroidX.Lifecycle.Lifecycle.Event._members.StaticMethods.InvokeObjectMethod("values.()[Landroidx/lifecycle/Lifecycle$Event;", (JniArgumentValue*) null).Handle, JniHandleOwnership.TransferLocalRef, typeof (AndroidX.Lifecycle.Lifecycle.Event));
}
>>>>>> This package is from the old lib, right? <<<<<<<<<
[Annotation("android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_CREATE)")]
public class OnCreateAttribute : Attribute
{
}
>>>>>> This package is from the old lib, right? <<<<<<<<<
[Annotation("android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_START)")]
public class OnStartAttribute : Attribute
{
}
>>>>>> This package is from the old lib, right? <<<<<<<<<
[Annotation("android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_RESUME)")]
public class OnResumeAttribute : Attribute
{
}
>>>>>> This package is from the old lib, right? <<<<<<<<<
[Annotation("android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_PAUSE)")]
public class OnPauseAttribute : Attribute
{
}
>>>>>> This package is from the old lib, right? <<<<<<<<<
[Annotation("android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_STOP)")]
public class OnStopAttribute : Attribute
{
}
>>>>>> This package is from the old lib, right? <<<<<<<<<
[Annotation("android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_DESTROY)")]
public class OnDestroyAttribute : Attribute
{
}
>>>>>> This package is from the old lib, right? <<<<<<<<<
[Annotation("android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_ANY)")]
public class OnAnyAttribute : Attribute
{
}
}
}
}
10.1.0.1
Windows 10
AndroidX Preview 1
Some themes are missing (esp. for DayNight Support)
Add Nuget package Xamarin.Google.Android.Material and refer to the theme
Xamarin.Android SDK 9.1.7.0 (HEAD/ba9da7a76)
Xamarin.Android Reference Assemblies and MSBuild support.
Windows 10
Microsoft Visual Studio Professional 2017
Version 15.9.16
VisualStudio.15.Release/15.9.16+28307.858
Microsoft .NET Framework
Version 4.8.03752
Xamarin.AndroidX.Lifecycle.Common v2.0.0-preview02
Trying to create an AAR binding library that migrated to AndroidX (written in Java, using class androidx.lifecycle.LifecycleOwner), previously using support library and compiling correctly.
Xamarin.AndroidX.Lifecycle.Common dependency is added to the binding project, however still encountering the following error log:
https://pdftron.s3.amazonaws.com/custom/external/xamarin/androidx/androidx-error.txt
4>JARTOXML : warning J2XA006: missing class error was raised while reflecting com.pdftron.pdf.controls.AnnotationToolbar : androidx/lifecycle/LifecycleOwner
4> java.lang.NoClassDefFoundError: androidx/lifecycle/LifecycleOwner (TaskId:138)
4> at java.lang.ClassLoader.defineClass1(Native Method) (TaskId:138)
4> at java.lang.ClassLoader.defineClass(ClassLoader.java:760) (TaskId:138)
4> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) (TaskId:138)
Download the sample project, open solution "\projectSrc\PDFNetAndroidXamarin\PDFNetAndroidXamarin.sln"
Clean and build "PDFViewCtrlTools" project.
Link to sample:
http://pdftron.s3.amazonaws.com/custom/external/xamarin/androidx/to-Xamarin.zip
https://pdftron.s3.amazonaws.com/custom/external/xamarin/androidx/androidx-error.txt
9.0
Winsdows 10
AndroidX v1.0.0-rc1
W/BiometricPromptCompat( 5060): Not launching prompt. authenticate() called after onSaveInstanceState()
Calling the Biometric Prompt during OnResume() dismisses the dialog with an error saying that the prompt cannot be launched after onSaveInstanceState() has been called.
Wrapping the call to BiometricManager in a fragment transaction with CommitAllowingStateLoss() also does not have any effect
Calling the Biometric Prompt during OnResume()
public async Task<bool> Authenticate(CancellationToken cancellationToken)
{
var promptInfo = new BiometricPrompt.PromptInfo.Builder()
.SetTitle("Login")
.SetNegativeButtonText("Cancel")
.Build();
var activity = _activityResolver();
var executor = Executors.NewSingleThreadExecutor();
var handler = new BiometricsAuthenticationHandler();
using var dialog = new BiometricPrompt((FragmentActivity) activity, executor, handler);
await using (cancellationToken.Register(() => dialog.CancelAuthentication()))
{
dialog.Authenticate(promptInfo);
return await handler.Task;
}
}
W/BiometricPromptCompat( 5060): Not launching prompt. authenticate() called after onSaveInstanceState()
Visual Studio 2019 16.4
Callstack of the exception
The method or operation is not implemented.
at Mono.Cecil.Pdb.NativePdbWriterProvider.GetSymbolWriter(ModuleDefinition module, Stream symbolStream)
at Mono.Cecil.Pdb.PdbWriterProvider.GetSymbolWriter(ModuleDefinition module, Stream symbolStream)
at Mono.Cecil.ModuleWriter.GetSymbolWriter(ModuleDefinition module, String fq_name, ISymbolWriterProvider symbol_writer_provider, WriterParameters parameters)
at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable1 stream, WriterParameters parameters) at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable
1 stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination) in D:\a\1\s\source\Xamarin.AndroidX.Migration\Migration\CecilMigrator.cs:line 117
at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies) in D:\a\1\s\source\Xamarin.AndroidX.Migration\Migration\CecilMigrator.cs:line 50
at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute() in D:\a\1\s\source\Xamarin.AndroidX.Migration\BuildTasks\CecilfyFiles.cs:line 35 Muellerchur.Xamos.Mobile.Android
I attached a debugger and disassembled the method.
And the method has this Implementation.
public ISymbolWriter GetSymbolWriter(ModuleDefinition module, Stream symbolStream)
{
throw new NotImplementedException();
}
So it isn't implemented.
Picked up the new 4.5.0-pre2, fixed one missing reference to AndroidX.MediaRouter, and our app built.
Comparing the old vs new build (which uses aot startup profiling):
Is this in any way expected or possibly reflecting an issue?
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: fd9f379
Java.Interop: xamarin/java.interop/d16-4@c4e569f
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.28.0@46204c4
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-5@9f4ed4b
Android 10 Q
29
15
When a Xamarin.Forms component has a dependency on Android.Support.v7.RecyclerView
, the AndroidX RecyclerView type is used by accident when the project's Linker is set to SDK Assemblies Only
This results in an a build error claiming the setHasStableIds
method cannot be resolved.
Setup
Run 1 - Control Test
Run 2 - Reproducible Test
Error Mono.Linker.MarkException: Error processing method: 'System.Void Telerik.XamarinForms.DataControlsRenderer.Android.ItemsControlRenderer::OnElementAttached(Telerik.XamarinForms.DataControls.ItemsControl)' in assembly: 'Telerik.XamarinForms.DataControls.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void AndroidX.RecyclerView.Widget.RecyclerView/Adapter::set_HasStableIds(System.Boolean)
The location that error is thrown in in our adapter class. I am unable to share the full source code, but I can still identify how we're expecting the type to be android.support.v7.widget.RecyclerView
Notice the following:
android.support.v7.widget.RecyclerView
setHasStableIds()
to be available in the SDK's RecyclerView Adapterimport android.support.v7.widget.RecyclerView;
...
public abstract class ListViewAdapterBase extends RecyclerView.Adapter<ListViewHolder> {
...
public ListViewAdapterBase() {
[dedacted]
[dedacted]
[dedacted]
this.setHasStableIds(true);
}
...
}
I tried to avoid this by telling the compiler to linkskip Xamarin.Android.Support.v7.RecyclerView
. However, it doesn't work. Is there another assembly I can add to workaround the issue?
the only solution I could find was to uninstall Xamarin.AndroidX.RecyclerView
. Once it (and dependencies) were uninstalled, the build works when linking out SDK Assemblies.
<attr>
nodes with interface
in the path
attribute do not have name="visibility"
attributes (or throw error)Copy of this issue: xamarin/AndroidSupportComponents#225
Xamarin.Android.Support.Constraint.Layout 2.0.0-beta2
Xamarin.Android.Support.Constraint.Layout.Solver 2.0.0-beta2
The interface ITransitionListner just has p0, p1, p2, p3 as names for the arguments you can pass into the method it defines.
void OnTransitionChange(MotionLayout p0, int p1, int p2, float p3)
void OnTransitionCompleted(MotionLayout p0, int p1)
void OnTransitionStarted(MotionLayout p0, int p1, int p2)
void OnTransitionTrigger(MotionLayout p0, int p1, bool p2, float p3)
I would expect them to be:
void OnTransitionChange(MotionLayout motionLayout, int startId, int endId, float progress)
void OnTransitionCompleted(MotionLayout motionLayout, int currentId)
void OnTransitionStarted(MotionLayout motionLayout, int startId, int endId)
void OnTransitionTrigger(MotionLayout motionLayout, int triggerId, bool positive, float progress)
Xamarin.Android.Support.Constraint.Layout
2.0.0-beta2MotionLayout.ITransitionListener
: private class MotionLayoutListener : Java.Lang.Object, MotionLayout.ITransitionListener
Following the migration steps to migrate to the new AndroidX API's done successfully : Build without error, but After removing Migration package I get a lot of error, this is an excerpt:
...
Error Original attribute defined here. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\113\jl\res\values\values.xml 148
Error Original attribute defined here. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\135\jl\res\values\values.xml 31
Error Original attribute defined here. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\135\jl\res\values\values.xml 68
Error Original attribute defined here. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\135\jl\res\values\values.xml 87
...
Error Attribute "fontProviderFetchTimeout" already defined with incompatible format. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\34\jl\res\values\values.xml 52
Error Attribute "fontStyle" already defined with incompatible format. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\34\jl\res\values\values.xml 62
Error Attribute "layout_anchorGravity" already defined with incompatible format. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\35\jl\res\values\values.xml 29
Error Attribute "layout_insetEdge" already defined with incompatible format. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\35\jl\res\values\values.xml 68
Error Attribute "layout_dodgeInsetEdges" already defined with incompatible format. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\35\jl\res\values\values.xml 85
Error Attribute "layout_scrollFlags" already defined with incompatible format. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\41\jl\res\values\values.xml 59
Error Attribute "fabAlignmentMode" already defined with incompatible format. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\41\jl\res\values\values.xml 78
Error Attribute "labelVisibilityMode" already defined with incompatible format. MyProject.Android --PATH HERE -- \MyProject.Android\obj\Debug\100\lp\41\jl\res\values\values.xml 84
...
remove Bin & Obj folders, restart vs studio not fixing the problem
can anyone help
Thank you
Is there a way to enable FontAwesome Icons in AndroidX? They work fine when I roll back to Android 9.
I have them setup in my Resource.Dictionary in App.xaml and then refer to the ImageSource as a {StaticResource FontImageName}.
Any ideas?
Anyone could how to build it since https://dev.azure.com/xamarin/public/_apis/build/builds/10297/artifacts?artifactName=nuget&format=zip&api-version=5.0 return 404
Need to add these lines to com.google.android.material/material/transforms/Metadata.xml for 1.1.0-rc1:
<remove-node path="/api/package[@name='com.google.android.material.button']/interface[@name='MaterialButton.OnPressedChangeListener']" />
<remove-node path="/api/package[@name='com.google.android.material.datepicker']/interface[@name='MaterialCalendar.OnDayClickListener']" />
<remove-node path="/api/package[@name='com.google.android.material.bottomappbar']/interface[@name='BottomAppBar.AnimationListener']" />
I think this is a known issue on the Google side, but I'm not sure if it has been sorted yet or is going to propagate to Xamarin soon:
I have a SupportMapFragment, which inherits Support.V4.App.Fragment. Before I migrated to AndroidX I had this line:
_mapFragment = (SupportMapFragment)ChildFragmentManager.FindFragmentById(Resource.Id.map);
Now I get a casting error because the AndroidX fragment's child fragment manager doesn't return a support fragment.
I'm not being able to compile my project on release mode anymore without "Use Shared Runtime" checked.
2> C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : The method or operation is not implemented.
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.Pdb.NativePdbWriterProvider.GetSymbolWriter(ModuleDefinition module, Stream symbolStream)
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.Pdb.PdbWriterProvider.GetSymbolWriter(ModuleDefinition module, Stream symbolStream)
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.ModuleWriter.GetSymbolWriter(ModuleDefinition module, String fq_name, ISymbolWriterProvider symbol_writer_provider, WriterParameters parameters)
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.ModuleWriter.Write(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.ModuleWriter.WriteModule(ModuleDefinition module, Disposable`1 stream, WriterParameters parameters)
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination) in D:\a\1\s\source\Xamarin.AndroidX.Migration\Migration\CecilMigrator.cs:line 117
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies) in D:\a\1\s\source\Xamarin.AndroidX.Migration\Migration\CecilMigrator.cs:line 50
2>C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview04\build\Xamarin.AndroidX.Migration.targets(212,9): error : at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute() in D:\a\1\s\source\Xamarin.AndroidX.Migration\BuildTasks\CecilfyFiles.cs:line 35
If I check the option, I can compile, but not deploy to a device.
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========
Xamarin Android 10.1
Windows 10 Build 1903
Example: Xamarin-AndroidX.Preference 1.0.0-preview06
It seems that since preview03 of the AndroidX libraries some methods previously bound to a explicit return type now only return Java.Lang.Object.
For example, since 1.0.0-preview03 the method public <T extends Preference> findPreference (CharSequence key)
(and its overloads) in PreferenceFragmentCompat
, which was previously bound with a Preference
return type, is now bound with a Java.Lang.Object
return type.
While casting this Object
to a Preference
does work fine, it does add a extra layer of casting not originally present.
The issue seems to be related to the method return types being a implicit generic <T extends Preference>
rather than the explicit return types these methods used to have in the pre-AndroidX support libraries.
Though the return type is defined as generic, a subclass of Preference is guaranteed through the extends Preference
condition, so abstraction as far as Java.Lang.Object
should not be necessary.
After upgrading to the preview03 versions of the support packages builds started failing for my Xamarin Forms Android project with the following error message:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2105,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2105,5): error MSB4018: Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'AndroidX.AppCompat.Graphics.Drawable.DrawableWrapper' (defined in assembly 'Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null') with scope 'Xamarin.AndroidX.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve AndroidX.AppCompat.Graphics.Drawable.DrawableWrapper
The linker seems to be looking for the DrawableWrapper definition in the Xamarin.AndroidX.AppCompat assembly, which is where it was defined prior to the preview03 release of the support package. It seems this type along with a few others were moved into a new Android library, androidx.appcompat.appcompat-resources, so they are now located in a new assembly for the Xamarin Android support packages, Xamarin.AndroidX.AppCompat.Resources.
I was able to get the build working by adding a _AndroidXAssembly definition for Xamarin.Android.AppCompat.Resources in Xamarin.AndroidX.Migration.props, and also updating the AndroidX .NET Assembly column values to Xamarin.AndroidX.AppCompat.Resources in androidx-mapping.csv for the types:
AndroidX.AppCompat.Graphics.Drawable.AnimatedStateListDrawableCompat
AndroidX.AppCompat.Graphics.Drawable.DrawableWrapper
AndroidX.AppCompat.Content.Res.AppCompatResources
AndroidX.AppCompat.Widget.DrawableUtils
AndroidX.AppCompat.Widget.TintContextWrapper
AndroidX.AppCompat.Widget.VectorEnabledTintResources
I have seen that vs now supports migration tooling as an experimental feature that we have to turn on.
After turning on that feature I cannot find any way to use migration wizard. I am completely failed to find any doc about it. Then I learned from a twitter screenshot that option for migration will be appeared in my projects menu(under archive in build menu). But in my case I cannot find anything.
What am I missing ?
Xamarin.Android SDK 10.1.0.30 (d16-4/5e2fd06)
Windows 10
Microsoft Visual Studio Enterprise 2019
Version 16.4.0
VisualStudio.16.Release/16.4.0+29519.181
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Enterprise
...
Mono Debugging for Visual Studio 16.5.23 (1b51e8c)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 5.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
...
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 16.4.000.305 (d16-4@a9ec5d9)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 16.4.0.464 (remotes/origin/d16-4@4abf337c3)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 16.4.25 (579ee62)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 10.1.0.30 (d16-4/5e2fd06)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: e1ef774
Java.Interop: xamarin/java.interop/d16-4@c4e569f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@46204c4
Xamarin.Android Tools: xamarin/xamarin-android-tools/master@9f4ed4b
Xamarin.iOS and Xamarin.Mac SDK 13.8.2.2 (44c08f2)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Xamarin.AndroidX.MediaRouter 1.1.0-preview06
After updating from preview03 to preview06 I get the following build error (javac.exe error JAVAC0000)
OnDynamicRoutesChangedListener is not public in DynamicGroupRouteController; cannot be accessed from outside package
androidx.mediarouter.media.MediaRouteProvider.DynamicGroupRouteController.OnDynamicRoutesChangedListener Sample.Android C:\Projekte\xamarin-fingerprint\src\Sample.Android\obj\Debug\90\android\src\mono\androidx\mediarouter\media\MediaRouteProvider_DynamicGroupRouteController_OnDynamicRoutesChangedListenerImplementor.java 8
After installing Xamarin.Forms 4.5.0.356 and updating all AndroidX packages the rebuild process produces the following error:
../Test/packages/Xamarin.AndroidX.Migration.1.0.0/build/monoandroid90/Xamarin.AndroidX.Migration.targets(9,9): Error: Could not find 1 Android X assemblies, make sure to install the following NuGet packages:
- Xamarin.AndroidX.AppCompat.Resources
You can also copy-and-paste the following snippet into your .csproj file:
<PackageReference Include="Xamarin.AndroidX.AppCompat.Resources" Version="1.1.0" /> (Test.Droid)
../Test/packages/Xamarin.AndroidX.Migration.1.0.0/build/monoandroid90/Xamarin.AndroidX.Migration.targets(9,9): Error: Could not find 1 Android X assemblies, make sure to install the following NuGet packages:
- Xamarin.AndroidX.AppCompat.Resources
You can also copy-and-paste the following snippet into your .csproj file:
<PackageReference Include="Xamarin.AndroidX.AppCompat.Resources" Version="1.1.0" /> (Test.Droid)
The .Droid project rebuilds without errors.
Produces the error mentioned in the description:
../Test/packages/Xamarin.AndroidX.Migration.1.0.0/build/monoandroid90/Xamarin.AndroidX.Migration.targets(9,9): Error: Could not find 1 Android X assemblies, make sure to install the following NuGet packages:
- Xamarin.AndroidX.AppCompat.Resources
You can also copy-and-paste the following snippet into your .csproj file:
<PackageReference Include="Xamarin.AndroidX.AppCompat.Resources" Version="1.1.0" /> (Test.Droid)
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="monoandroid10.0" />
<package id="Plugin.CurrentActivity" version="2.1.0.4" targetFramework="monoandroid10.0" />
<package id="Plugin.Share" version="7.1.1" targetFramework="monoandroid10.0" />
<package id="Xam.Plugin.Connectivity" version="3.2.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Arch.Core.Common" version="1.1.1.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Arch.Core.Runtime" version="1.1.1.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Arch.Lifecycle.Common" version="1.1.1.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Arch.Lifecycle.LiveData" version="1.1.1.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Arch.Lifecycle.LiveData.Core" version="1.1.1.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.1.1.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Arch.Lifecycle.ViewModel" version="1.1.1.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Annotations" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.AsyncLayoutInflater" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Collections" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Compat" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.CoordinaterLayout" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Core.UI" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Core.Utils" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.CursorAdapter" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.CustomTabs" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.CustomView" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Design" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.DocumentFile" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.DrawerLayout" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Fragment" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Interpolator" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Loader" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.LocalBroadcastManager" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Media.Compat" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Print" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.SlidingPaneLayout" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.SwipeRefreshLayout" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Transition" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.v4" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.v7.CardView" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.VersionedParcelable" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.Android.Support.ViewPager" version="28.0.0.3" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Activity" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Annotation" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.AppCompat" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.AppCompat.Resources" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Arch.Core.Common" version="2.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Arch.Core.Runtime" version="2.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.AsyncLayoutInflater" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Browser" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.CardView" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Collection" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.CoordinatorLayout" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Core" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.CursorAdapter" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.CustomView" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.DocumentFile" version="1.0.1" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.DrawerLayout" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Fragment" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Interpolator" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Legacy.Support.Core.UI" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Legacy.Support.Core.Utils" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Legacy.Support.V4" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Lifecycle.Common" version="2.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Lifecycle.LiveData.Core" version="2.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Lifecycle.Runtime" version="2.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Lifecycle.ViewModel" version="2.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Loader" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.LocalBroadcastManager" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Media" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Migration" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.MultiDex" version="2.0.1" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Print" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.RecyclerView" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.SavedState" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.SlidingPaneLayout" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.SwipeRefreshLayout" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.Transition" version="1.2.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.VectorDrawable" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.VectorDrawable.Animated" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.VersionedParcelable" version="1.1.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.AndroidX.ViewPager" version="1.0.0" targetFramework="monoandroid10.0" />
<package id="Xamarin.Forms" version="4.5.0.356" targetFramework="monoandroid10.0" />
<package id="Xamarin.Google.Android.Material" version="1.0.0" targetFramework="monoandroid10.0" />
Open the zipped file below. The "Steps to Reproduce" are applied to the android project inside of the solution.
No workaround was found. :(
During my testing I broke the symbols. As a result, the build could never succeed as it will read the broken symbols and crash.
If there is a NuGet out there that has bad symbols...
We have some really old things, such as components
AndroidX.Navigation NavController DestinationChangedEventArgs still using P0, P1, P2 variables for NavController, NavDestination and Bundle.
Version: 10.1.3.7
Mac OSX 10.15.2
28.0.3
It works well until previous version a few days ago, but build error occurs today, then I upgrade dependency libraries to the newest, error changes to:
<PackageReference Include="Xamarin.AndroidX.Migration">
<Version>1.0.0-preview05</Version>
<Version>1.0.0-rc1</Version>
</PackageReference>
[MonoDroid] System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.AndroidX.AppCompat.Resources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
[MonoDroid] File name: 'Xamarin.AndroidX.AppCompat.Resources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
[MonoDroid] at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x0002c] in <6b940a667a274fa48104ab71b2541709>:0
[MonoDroid] at Xamarin.Forms.Platform.Android.ResourceManager.GetFormsDrawableAsync (Android.Content.Context context, Xamarin.Forms.ImageSource imageSource, System.Threading.CancellationToken cancellationToken) [0x00033] in <a38b08ed6ae34fcca788cdc23b3fac01>:0
[MonoDroid] at Xamarin.Forms.Platform.Android.BottomNavigationViewUtils.SetMenuItemIcon (Android.Views.IMenuItem menuItem, Xamarin.Forms.ImageSource source, Android.Content.Context context) [0x00017] in <a38b08ed6ae34fcca788cdc23b3fac01>:0
[MonoDroid] at Xamarin.Forms.Platform.Android.BottomNavigationViewUtils.SetupMenu (Android.Views.IMenu menu, System.Int32 maxBottomItems, System.Collections.Generic.List`1[T] items, System.Int32 currentIndex, Google.Android.Material.BottomNavigation.BottomNavigationView bottomView, Android.Content.Context context) [0x001c8] in <a38b08ed6ae34fcca788cdc23b3fac01>:0
[MonoDroid] at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in <6b940a667a274fa48104ab71b2541709>:0
[MonoDroid] at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <78bc2a97e5be434ba8d7b494fe3c28fb>:0
[MonoDroid] at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <78bc2a97e5be434ba8d7b494fe3c28fb>:0
[MonoDroid] at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <78bc2a97e5be434ba8d7b494fe3c28fb>:0
[MonoDroid] at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.44(intptr,intptr)
The list of Android Support and Android X assemblies need to be updated in the Xamarin.AndroidX.Migration.props.
These lists are simply to help the build skip out the assemblies we KNOW are already migrated - Android X is already Android X, or that should NOT be migrated - Android Support is never going to reach the device.
There is also a list of Android X artifacts that we know should not even be opened.
All of this is to speed up the build. Since the types are already Android X, they should never need updating and will be skipped. But 70+ dlls and 70+ jars does mean that it takes a good few milliseconds more than necessary.
After applying the suggested fix from #56 and rebuilding the library I'm running in to some sort of incompatibility with Material Visual on Android with Entry and Editor.
With the new version, on Android, the background color of Entry seems to come from TextColor instead of BackgroundColor, with BackgroundColor having no effect. From what I'm personally using in the library, this seems to be the only issue. These fields display as expected on iOS.
I don't know if this is the proper place to report this, so if I'm incorrect just let me know.
Hi,
I'm using latest Visual Studio 2019 version 16.4.2...
I have a Xamarin Android application targetting framework Android 10.0 (Q) that use the following packages..
Xamarin.Android.Support.v4 28.0.0.3
Xamarin.Android.Support.v7.AppCompat 28.0.0.3
Xamarin.Android.Support.v7.CardView 28.0.0.3
Xamarin.Android.Support.v7.Preference 28.0.0.3
Xamarin.Android.Support.v7.RecyclerView 28.0.0.3
Xamarin.Android.Support.Vector.Drawable 28.0.0.3
Xamarin.Android.Support.VersionedParcelable 28.0.0.3
Xamarin.Android.Support.ViewPager 28.0.0.3
..and this packages for enable Google FCM messaging..
Xamarin.GooglePlayServices.Base 71.1610.0
Xamarin.GooglePlayServices.Basement 71.1620.0
Xamarin.GooglePlayServices.Stats 71.1601.0
Xamarin.GooglePlayServices.Tasks 71.1601.0
Xamarin.Firebase.Common 71.1610.0
Xamarin.Firebase.Iid 71.1710.0
Xamarin.Firebase.Iid.Interop 71.1601.0
Xamarin.Firebase.Measurement.Connector 71.1701.0
Xamarin.Firebase.Messaging 71.1740.0
...After adding Xamarin.AndroidX.Migration 1.0.0-preview06 package and added missing Xamarin.AndroidX.* packages…
Xamarin.AndroidX.Activity 1.0.0-preview06
Xamarin.AndroidX.Annotation 1.1.0-preview06
Xamarin.AndroidX.AppCompat 1.1.0-preview06
Xamarin.AndroidX.AppCompat.Resources 1.1.0-preview06
Xamarin.AndroidX.Arch.Core.Common 2.1.0-preview06
Xamarin.AndroidX.Arch.Core.Runtime 2.1.0-preview06
Xamarin.AndroidX.AsyncLayoutInflater 1.0.0-preview06
Xamarin.AndroidX.Browser 1.1.0-preview06
Xamarin.AndroidX.CardView 1.0.0-preview06
Xamarin.AndroidX.Collection 1.1.0-preview06
Xamarin.AndroidX.CoordinatorLayout 1.0.0-preview06
Xamarin.AndroidX.Core 1.1.0-preview06
Xamarin.AndroidX.CursorAdapter 1.0.0-preview06
Xamarin.AndroidX.CustomView 1.0.0-preview06
Xamarin.AndroidX.DocumentFile 1.0.1-preview06
Xamarin.AndroidX.DrawerLayout 1.0.0-preview06
Xamarin.AndroidX.Fragment 1.1.0-preview06
Xamarin.AndroidX.Interpolator 1.0.0-preview06
Xamarin.AndroidX.Legacy.Support.Core.UI 1.0.0-preview06
Xamarin.AndroidX.Legacy.Support.Core.Utils 1.0.0-preview06
Xamarin.AndroidX.Legacy.Support.V4 1.0.0-preview06
Xamarin.AndroidX.Lifecycle.Common 2.1.0-preview06
Xamarin.AndroidX.Lifecycle.LiveData 2.1.0-preview06
Xamarin.AndroidX.Lifecycle.LiveData.Core 2.1.0-preview06
Xamarin.AndroidX.Lifecycle.Runtime 2.1.0-preview06
Xamarin.AndroidX.Lifecycle.ViewModel 2.1.0-preview06
Xamarin.AndroidX.Loader 1.1.0-preview06
Xamarin.AndroidX.LocalBroadcastManager 1.0.0-preview06
Xamarin.AndroidX.Media 1.1.0-preview06
Xamarin.AndroidX.MultiDex 2.0.1-preview06
Xamarin.AndroidX.Preference 1.1.0-preview06
Xamarin.AndroidX.Print 1.0.0-preview06
Xamarin.AndroidX.RecyclerView 1.0.0-preview06
Xamarin.AndroidX.SavedState 1.0.0-preview06
Xamarin.AndroidX.SlidingPaneLayout 1.1.0-preview06
Xamarin.AndroidX.SwipeRefreshLayout 1.0.0-preview06
Xamarin.AndroidX.Transition 1.2.0-preview06
Xamarin.AndroidX.VectorDrawable 1.1.0-preview06
Xamarin.AndroidX.VectorDrawable.Animated 1.1.0-preview06
Xamarin.AndroidX.VersionedParcelable 1.1.0-preview06
Xamarin.AndroidX.ViewPager 1.0.0-preview06
Xamarin.Google.Android.Material 1.1.0-preview06
..the Build process show the follwing error…
1>------ Build started: Project: ZetaHouseMobileApp, Configuration: Debug Any CPU ------
1> ZetaHouseMobileApp -> C:\GitHub\HelloAndroid\HelloAndroidApp\HelloAndroidApp\bin\Debug\ZetaHouseMobileApp.dll
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/ItemListIntents;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/NoteIntents;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/ReserveIntents;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/actions/SearchIntents;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/AccountPicker;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/BlockingServiceConnection;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/ConnectionResult;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/Feature;
1> Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/FirstPartyScopes;
1>
1> UNEXPECTED TOP-LEVEL EXCEPTION:
1> java.lang.RuntimeException: Translation has been interrupted
1> at com.android.dx.command.dexer.Main.processAllFiles(Main.java:614)
1> at com.android.dx.command.dexer.Main.runMonoDex(Main.java:310)
1> at com.android.dx.command.dexer.Main.runDx(Main.java:288)
1> at com.android.dx.command.dexer.Main.main(Main.java:244)
1> at com.android.dx.command.Main.main(Main.java:95)
1> Caused by: java.lang.InterruptedException: Too many errors
1> at com.android.dx.command.dexer.Main.processAllFiles(Main.java:606)
1> ... 4 more
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2613,3): error : java.lang.IllegalArgumentException: already added : Lcom/google/android/gms/actions/ItemListIntents;
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
I dont undestand where is the problem in migration process to AndroidX.
I've just tried to uninstall all Xamarin.Firebase.* and Xamarin.GooglePlayServices.* packages , then readded but problem persists..
Thanks for any suggestions.
Best Regards.
Have to revert back to preview06. See Class PreferenceManager
DevOps CI error
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(535,3): warning XA0119: Using Fast Deployment and a Code Shrinker at the same time is not recommended. Use Fast Deployment for Debug configurations and a Code Shrinker for Release configurations. [/Users/runner/runners/2.165.0/work/1/s/samples/BuildAll/BuildAll/BuildAll.csproj]
obj/Debug/android/src/mono/androidx/paging/AsyncPagedListDiffer_PagedListListenerImplementor.java(8,39): javac error JAVAC0000: error: PagedListListener is not public in AsyncPagedListDiffer; cannot be accessed from outside package [/Users/runner/runners/2.165.0/work/1/s/samples/BuildAll/BuildAll/BuildAll.csproj]
obj/Debug/android/src/mono/androidx/paging/AsyncPagedListDiffer_PagedListListenerImplementor.java(8,39): javac error JAVAC0000: androidx.paging.AsyncPagedListDiffer.PagedListListener [/Users/runner/runners/2.165.0/work/1/s/samples/BuildAll/BuildAll/BuildAll.csproj]
obj/Debug/android/src/mono/androidx/paging/AsyncPagedListDiffer_PagedListListenerImplementor.java(8,39): javac error JAVAC0000: [/Users/runner/runners/2.165.0/work/1/s/samples/BuildAll/BuildAll/BuildAll.csproj]
obj/Debug/android/src/mono/androidx/work/impl/background/systemalarm/SystemAlarmDispatcher_CommandsCompletedListenerImplementor.java(8,66): javac error JAVAC0000: error: CommandsCompletedListener is not public in SystemAlarmDispatcher; cannot be accessed from outside package [/Users/runner/runners/2.165.0/work/1/s/samples/BuildAll/BuildAll/BuildAll.csproj]
obj/Debug/android/src/mono/androidx/work/impl/background/systemalarm/SystemAlarmDispatcher_CommandsCompletedListenerImplementor.java(8,66): javac error JAVAC0000: androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.CommandsCompletedListener [/Users/runner/runners/2.165.0/work/1/s/samples/BuildAll/BuildAll/BuildAll.csproj]
obj/Debug/android/src/mono/androidx/work/impl/background/systemalarm/SystemAlarmDispatcher_CommandsCompletedListenerImplementor.java(8,66): javac error JAVAC0000: [/Users/runner/runners/2.165.0/work/1/s/samples/BuildAll/BuildAll/BuildAll.csproj]
We can maybe take some things from here: dotnet/android@9bc8e80
Xamarin.Android 10.1.4.0 (d16-4 e44d1ae)
Windows 10 1909 (IDE: Visual Studio 2019 16.4.5)
Xamarin.AndroidX.ViewPager2 1.0.0
The class FragmentStateAdapter which is used for the new ViewPager2 seems to have a Java binding issue regarding inheritance.
In Java, the FragmentStateAdapter class inherits the RecyclerView.Adapter class, which has the abstract onBindViewHolder
method. This abstract method is implemented and sealed (marked final) by the FragmentStateAdapter class to get a chunk of its functionality working. In Java and Kotlin this means any implementation of FragmentStateAdapter does not require implementation of the onBindViewHolder
method.
In the Xamarin binding there seems to be a mismatch in inheritance however. The signature of the of the OnBindViewHolder
implementation in FragmentStateAdapter seems to mismatch with the OnBindViewHolder
in the parent RecyclerView.Adapter class.
On the C# side of things, this causes the responsibility of implementing the abstract OnBindViewHolder
in RecyclerView.Adapter to cascade down to the classes that inherit FragmentStateAdapter (since the implementation in FragmentStateAdapter mismatches it is now missing as far as the C# compiler is concerned)
If I try to implement the method in my FragmentStateAdapter subclasses to make sure the C# compiler shows no errors, the Java build error shown below appears instead:
JAVAC0000: error: name clash: onBindViewHolder(ViewHolder,int) in MyTestActivity_MyPagerAdapter and onBindViewHolder(VH,int) in Adapter have the same erasure, yet neither overrides the other
public void onBindViewHolder (androidx.recyclerview.widget.RecyclerView.ViewHolder p0, int p1) where VH is a type-variable: VH extends ViewHolder declared in class Adapter
The issue seems to be caused by the following mismatch:
In Java, the generic signature onBindViewHolder(VH holder, int position)
(where VH is a generic defined in the RecyclerView.Adapter class signature) is properly inherited by the method signature onBindViewHolder(FragmentViewHolder holder, int position)
.
In C#/Xamarin however, it seems the RecyclerView.Adapter doesn't have this generic aspect bound. Instead using the ViewHolder base type in place of the generic.
This likely causes the OnBindViewHolder(FragmentViewHolder holder, int position)
method in the FragmentStateAdapter to mismatch with the now non-generic OnBindViewHolder(ViewHolder holder, int position)
method in the RecyclerView.Adapter class
Xamarin Android Version: 10.1.3.7
Operating System & Version: Mac OS 10.14.6
Support Libraries Version: 28.0.0.1
I have a project with transitive dependencies which reference the Xamarin.Android.Support.Media.Compat package, and some which reference the newer Xamarin.AndroidX.Media package.
I have installed the Xamarin.AndroidX.Migration package.
When I attempt to reference the type MediaSessionCompat, I recieve the following error message:
Error CS0433: The type 'MediaSessionCompat' exists in both 'Xamarin.Android.Support.Media.Compat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Xamarin.AndroidX.Media, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' (CS0433)
I'm not sure if this scenario is supposed to be handled by the tooling, or if there is some other change I should have made to the project as part of the migration.
Many thanks for your help.
xamarin/Xamarin.Forms#9546 (comment)
Microsoft Visual Studio Community 2019
Version 16.4.2
Microsoft .NET Framework
Version 4.8.03752
Xamarin.Android SDK 10.1.1.0 (d16-4/f2c9364)
Windows 10 (1909)
Xamarin.AndroidX.Preference 1.1.0-rc1
PreferenceManager.GetDefaultSharedPreferences(this.context)
Error CS0117 'PreferenceManager' does not contain a definition for 'GetDefaultSharedPreferences'
The only static member available on PreferenceManager is SetDefaultValues (and the ones from base Object).
9.5.0.27
Windows 10 1903
VS 16.3.0 Preview 1
AndroidX 1.0 Preview 1
Errors when building application.
Looks like annotations in file "source/androidx.lifecycle/lifecycle-common/additions/Additions.cs" are outdated:
[Annotation("android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_CREATE)")]
Use code with attribute such as:
[Lifecycle.Event.OnStart()]
[Export]
public void OnAppForegrounded()
Found in build traces:
error: package android.arch.lifecycle does not exist
javac.exe error : @android.arch.lifecycle.OnLifecycleEvent(android.arch.lifecycle.Lifecycle.Event.ON_START)
I couldn't compile my project using Dotfuscator:
Symbols were found but are not matching the assembly
at Mono.Cecil.ModuleDefinition.ReadSymbols(ISymbolReader reader, Boolean throwIfSymbolsAreNotMaching)
at Mono.Cecil.ModuleReader.ReadSymbols(ModuleDefinition module, ReaderParameters parameters)
at Mono.Cecil.ModuleReader.CreateModule(Image image, ReaderParameters parameters)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(String source, String destination) in D:\a\1\s\source\Xamarin.AndroidX.Migration\CecilMigrator.cs:line 85
at Xamarin.AndroidX.Migration.CecilMigrator.Migrate(IEnumerable`1 assemblies) in D:\a\1\s\source\Xamarin.AndroidX.Migration\CecilMigrator.cs:line 50
at Xamarin.AndroidX.Migration.BuildTasks.CecilfyFiles.Execute() in D:\a\1\s\source\Xamarin.AndroidX.Migration.BuildTasks\CecilfyFiles.cs:line 35 x2Apps.CheckPlaca.App.Android C:\Users\mario.nuget\packages\xamarin.androidx.migration\1.0.0-preview02\build\Xamarin.AndroidX.Migration.targets 182
Setting the DotfuscatorXamarinEnabled option to FALSE in my csproj solves the problem.
There appears to be 2 files under obj\Debug\XX\proguard
:
These files are not part of the normal @(ProguardConfiguration)
configuration group, so I believe are being missed. They contain all the bits that Xamarin.Android needs to run, so can't be removed at all.
Local builds on Mac
obj/Debug/android/src/mono/androidx/work/impl/background/systemalarm/SystemAlarmDispatcher_CommandsCompletedListenerImplementor.java(8,66): javac error JAVAC0000: error: CommandsCompletedListener is not public in SystemAlarmDispatcher; cannot be accessed from outside package [/Users/Shared/Projects/d/X/AndroidX_master/samples/BuildAll/BuildAll/BuildAll.csproj]
obj/Debug/android/src/mono/androidx/work/impl/background/systemalarm/SystemAlarmDispatcher_CommandsCompletedListenerImplementor.java(8,66): javac error JAVAC0000: androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.CommandsCompletedListener [/Users/Shared/Projects/d/X/AndroidX_master/samples/BuildAll/BuildAll/BuildAll.csproj]
obj/Debug/android/src/mono/androidx/work/impl/background/systemalarm/SystemAlarmDispatcher_CommandsCompletedListenerImplementor.java(8,66): javac error JAVAC0000: [/Users/Shared/Projects/d/X/AndroidX_master/samples/BuildAll/BuildAll/BuildAll.csproj]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.