f-miyu / Plugin.FirebaseCrashlytics

MIT License
18 stars 7 forks source link

Failed to compile Xamarin Forms - Android exception #7

Open 420tech opened 2 years ago

420tech commented 2 years ago

My first attempt yield this error: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.D8.targets(5,5): Error: java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj/Debug/lp/183/jl/classes.jar : com/google/android/gms/internal/firebase_messaging/zza.class (CivicMobile.Android)

Searching, I discovered a similar error reported and recommended adding Xamarin.Google.Guava to the project. When I did, I got this error: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.D8.targets(5,5): Error: java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /Users/timbelvin/.nuget/packages/xamarin.google.guava.listenablefuture/1.0.0.9/buildTransitive/monoandroid12.0/../../jar/guava-listenablefuture.jar : com/google/common/util/concurrent/ListenableFuture.class (CivicMobile.Android)

miroatp commented 1 year ago

Check this link https://github.com/xamarin/AndroidX/issues/535, we added XamarinGoogleGuavaListenableFutureOptOut to our csproj and it started working again.