xamarin / AndroidX

AndroidX bindings for .NET for Android
MIT License
173 stars 42 forks source link

Xamarin.AndroidX.Biometric not building starting at version 1.1.0.17 (.NET MAUI) #861

Closed mamby closed 3 months ago

mamby commented 3 months ago

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

VS 2022 Preview

Description

1.1.0.16 and previous works fine!

Steps to Reproduce

  1. Create MAUI project and add nuget package (Xamarin.AndroidX.Biometric)
  2. Call an API : var promptInfo = new PromptInfo.Builder() .SetTitle(AppResources.AndroidBiometricPromptTitle) .SetDescription(AppResources.BiometricPromptMessage) .SetNegativeButtonText(AppResources.AndroidBiometricPromptNegativeText) .SetConfirmationRequired(true) .SetAllowedAuthenticators(Authenticators.BiometricStrong) .Build();

Did you find any workaround?

No response

Relevant log output

Severity    Code    Description Project File    Line    Suppression State
Error   JAVA0000    Error in C:\Users\xxx\.nuget\packages\xamarin.androidx.collection.jvm\1.4.0.1\buildTransitive\net7.0-android33.0\..\..\jar\androidx.collection.collection-jvm.jar:androidx/collection/ArrayMapKt.class:
Type androidx.collection.ArrayMapKt is defined multiple times: C:\Users\xxx\.nuget\packages\xamarin.androidx.collection.jvm\1.4.0.1\buildTransitive\net7.0-android33.0\..\..\jar\androidx.collection.collection-jvm.jar:androidx/collection/ArrayMapKt.class, C:\Users\xxx\.nuget\packages\xamarin.androidx.collection.ktx\1.2.0.9\buildTransitive\net6.0-android31.0\..\..\jar\androidx.collection.collection-ktx.jar:androidx/collection/ArrayMapKt.class
Compilation failed
java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\xxx\.nuget\packages\xamarin.androidx.collection.jvm\1.4.0.1\buildTransitive\net7.0-android33.0\..\..\jar\androidx.collection.collection-jvm.jar
androidx/collection/ArrayMapKt.class
    at com.android.tools.r8.utils.S0.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:135)
    at com.android.tools.r8.D8.main(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:5)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\xxx\.nuget\packages\xamarin.androidx.collection.jvm\1.4.0.1\buildTransitive\net7.0-android33.0\..\..\jar\androidx.collection.collection-jvm.jar:androidx/collection/ArrayMapKt.class
    at Version.fakeStackEntry(Version_8.2.42.java:0)
    at com.android.tools.r8.T.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:5)
    at com.android.tools.r8.utils.S0.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:82)
    at com.android.tools.r8.utils.S0.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:32)
    at com.android.tools.r8.utils.S0.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:31)
    at com.android.tools.r8.utils.S0.b(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:2)
    at com.android.tools.r8.D8.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:42)
    at com.android.tools.r8.D8.b(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:13)
    at com.android.tools.r8.D8.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:40)
    at com.android.tools.r8.utils.S0.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:122)
    ... 1 more
Caused by: com.android.tools.r8.utils.b: Type androidx.collection.ArrayMapKt is defined multiple times: C:\Users\xxx\.nuget\packages\xamarin.androidx.collection.jvm\1.4.0.1\buildTransitive\net7.0-android33.0\..\..\jar\androidx.collection.collection-jvm.jar:androidx/collection/ArrayMapKt.class, C:\Users\xxx\.nuget\packages\xamarin.androidx.collection.ktx\1.2.0.9\buildTransitive\net6.0-android31.0\..\..\jar\androidx.collection.collection-ktx.jar:androidx/collection/ArrayMapKt.class
    at com.android.tools.r8.utils.Q2.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:21)
    at com.android.tools.r8.utils.D2.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:54)
    at com.android.tools.r8.utils.D2.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:10)
    at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
    at com.android.tools.r8.utils.D2.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:6)
    at com.android.tools.r8.graph.m4$a.d(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:6)
    at com.android.tools.r8.dex.c.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:61)
    at com.android.tools.r8.dex.c.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:12)
    at com.android.tools.r8.dex.c.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:9)
    at com.android.tools.r8.D8.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:45)
    at com.android.tools.r8.D8.d(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:17)
    at com.android.tools.r8.D8.c(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:69)
    at com.android.tools.r8.utils.S0.a(R8_8.2.42_9ad08e95c347188a6c635bdc6315e258071719194689c80a2a99dea0b762189c:28)
    ... 6 more
    XXX     1
moljac commented 3 months ago

Thanks for the feedback

Related

https://github.com/xamarin/AndroidX/issues/764

and

https://github.com/dotnet/maui/issues/20561

See if that helps nd please report here. Even better if that helps and you fix the issue please close this issue.

Thanks

mamby commented 3 months ago

Thanks for the feedback

Related

764

and

dotnet/maui#20561

See if that helps nd please report here. Even better if that helps and you fix the issue please close this issue.

Thanks

It works! Thanks!

moljac commented 3 months ago

Thanks for the feedback. Appreciated