You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to create an app using .NET MAUI where I'm implementing Firebase authentication for mobile phone number verification. I'm using .NET 7 SDK, and the package I'm using for Firebase authentication is Xamarin.Firebase.Auth version 121.0.8. This is because Firebase Admin SDK doesn't support mobile phone verification.
However, I'm encountering issues when trying to upgrade the package to the latest version. Whenever I attempt to upgrade the package, it results in the following conflict:
ErrorNU1605: Warning As Error: Detected package downgrade: Xamarin.AndroidX.Browser from1.5.0.2 to 1.4.0.3. Reference the package directly from the project to selectadifferent version.
YabieFrontend -> Xamarin.Firebase.Auth 122.0.0.2 -> Xamarin.AndroidX.Browser (>= 1.5.0.2)
YabieFrontend -> Xamarin.AndroidX.Browser (>= 1.4.0.3)
I also attempted to manually upgrade Xamarin.AndroidX.Browser, but this led to the following runtime exception:
ErrorJAVA0000java:Errorin/Users/inshalkhan/.nuget/packages/xamarin.androidx.lifecycle.common/2.6.2.1/buildTransitive/net6.0-android31.0/../../jar/androidx.lifecycle.lifecycle-common.jar:androidx/lifecycle/DispatchQueue.class:
Type androidx.lifecycle.DispatchQueue is defined multiple times:/Users/inshalkhan/.nuget/packages/xamarin.androidx.lifecycle.common/2.6.2.1/buildTransitive/net6.0-android31.0/../../jar/androidx.lifecycle.lifecycle-common.jar:androidx/lifecycle/DispatchQueue.class, obj/Debug/net7.0-android/lp/152/jl/classes.jar:androidx/lifecycle/DispatchQueue.class
Compilation failed
java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin:/Users/inshalkhan/.nuget/packages/xamarin.androidx.lifecycle.common/2.6.2.1/buildTransitive/net6.0-android31.0/../../jar/androidx.lifecycle.lifecycle-common.jar
androidx/lifecycle/DispatchQueue.class
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:98)
at com.android.tools.r8.D8.main(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin:/Users/inshalkhan/.nuget/packages/xamarin.androidx.lifecycle.common/2.6.2.1/buildTransitive/net6.0-android31.0/../../jar/androidx.lifecycle.lifecycle-common.jar:androidx/lifecycle/DispatchQueue.class
at Version.fakeStackEntry(Version_3.3.75.java:0)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:75)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:28)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:27)
at com.android.tools.r8.internal.Fj.b(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:2)
at com.android.tools.r8.D8.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:22)
at com.android.tools.r8.D8.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:17)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:85)
...1 more
Caused by: com.android.tools.r8.internal.f: Type androidx.lifecycle.DispatchQueue is defined multiple times:/Users/inshalkhan/.nuget/packages/xamarin.androidx.lifecycle.common/2.6.2.1/buildTransitive/net6.0-android31.0/../../jar/androidx.lifecycle.lifecycle-common.jar:androidx/lifecycle/DispatchQueue.class, obj/Debug/net7.0-android/lp/152/jl/classes.jar:androidx/lifecycle/DispatchQueue.class
at com.android.tools.r8.internal.JT.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:14)
at com.android.tools.r8.internal.JT.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:22)
at com.android.tools.r8.internal.HN.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:33)
at com.android.tools.r8.internal.HN.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:10)
at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2048)
at com.android.tools.r8.internal.HN.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:6)
at com.android.tools.r8.graph.B2$a.e(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:4)
at com.android.tools.r8.dex.b.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:110)
at com.android.tools.r8.dex.b.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:28)
at com.android.tools.r8.D8.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:25)
at com.android.tools.r8.D8.d(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:606)
at com.android.tools.r8.D8.c(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:1)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:24)
...5 more
Directory 'obj/Debug/net7.0-android/lp/152' isfrom 'androidx.lifecycle.lifecycle-runtime-ktx.aar'.
I've tried various solutions found on Stack Overflow, such as cleaning and rebuilding the project, but nothing seems to be resolving the issue. When I revert to the older version I'm currently using, I encounter a runtime exception related to the setPhoneNumber method.
System.InvalidCastException: Specified cast is not valid.
at YabieFrontend.Services.AuthenticationService.AuthenticatePhoneNumber(String phoneNumber)in/Users/inshalkhan/RiderProjects/YabieFrontend/Platforms/Android/Services/AuthenticationService.cs:line 19
at YabieFrontend.ViewModel.LoginViewModel.Login()in/Users/inshalkhan/RiderProjects/YabieFrontend/ViewModel/LoginViewModel.cs:line 26
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)in/_/src/CommunityToolkit.Mvvm/Input/AsyncRelayCommand.cs:line 351
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Android.App.SyncContext.<>c__DisplayClass2_0.<Post>b__0()in/Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:line 36
at Java.Lang.Thread.RunnableImplementor.Run()in/Users/runner/work/1/s/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:line 36
at Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this)in/Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net7.0/android-33/mcw/Java.Lang.IRunnable.cs:line 84
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz)in/Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 22
I've been trying to create an app using .NET MAUI where I'm implementing Firebase authentication for mobile phone number verification. I'm using .NET 7 SDK, and the package I'm using for Firebase authentication is Xamarin.Firebase.Auth version 121.0.8. This is because Firebase Admin SDK doesn't support mobile phone verification.
However, I'm encountering issues when trying to upgrade the package to the latest version. Whenever I attempt to upgrade the package, it results in the following conflict:
I also attempted to manually upgrade Xamarin.AndroidX.Browser, but this led to the following runtime exception:
I've tried various solutions found on Stack Overflow, such as cleaning and rebuilding the project, but nothing seems to be resolving the issue. When I revert to the older version I'm currently using, I encounter a runtime exception related to the setPhoneNumber method.
Here's my code for reference:
Any assistance with resolving these issues would be greatly appreciated.
Originally posted by @Regis-Caelum in #14598 (reply in thread)
The text was updated successfully, but these errors were encountered: