Xamarin.Google.Guava issue with dependency version
dationguyen opened this issue · comments
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
Android
Description
dependency list of Xamarin.Google.Guava
net6.0-android31.0
Xamarin.CheckerFramework.CheckerQual (>= 3.38.0.1)
Xamarin.Google.Code.FindBugs.JSR305 (>= 3.0.2.9)
Xamarin.Google.ErrorProne.Annotations (>= 2.20.0.1)
Xamarin.Google.Guava.FailureAccess (>= 1.0.1.13)
Xamarin.Google.Guava.ListenableFuture (>= 9999.0.0)
Xamarin.Google.J2Objc.Annotations (>= 2.8.0.5)
notice that Xamarin.Google.Guava.ListenableFuture required version >= 9999.0.0
we can't use this package because of the latest version of Xamarin.Google.Guava.ListenableFuture is 1.0.0.15
Steps to Reproduce
- Create Android App
- Add reference to Xamarin.Google.Guava (31.1.0.9) and Xamarin.Google.Guava.ListenableFuture(1.0.0.15)
- could not restore packages
Did you find any workaround?
No response
Relevant log output
No response
Version 9999.0.0.0
of Xamarin.Google.Guava.ListenableFuture
exists, it is just unlisted because you shouldn't reference it directly:
https://www.nuget.org/packages/Xamarin.Google.Guava.ListenableFuture/9999.0.0.0
Is there a reason you are adding a reference to Xamarin.Google.Guava.ListenableFuture
? In general you should let packages that need it pull it in transitively and you should not add a direct reference to it.
If you do need to add a direct reference to it, you will need to specify version 9999.0.0.0
to fix the conflict.
hi @jpobst the version u sent has been unlisted, I am not sure if I still can use it.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
btw i have to use it because i am having this crash just 10s after the app started
[AndroidRuntime] FATAL EXCEPTION: pool-8-thread-1
[AndroidRuntime] Process: com.smokeball.android, PID: 32388
[AndroidRuntime] java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/util/concurrent/ListenableFuture;
[AndroidRuntime] at com.google.firebase.concurrent.ExecutorsRegistrar.scheduled(ExecutorsRegistrar.java:100)
[AndroidRuntime] at com.google.firebase.concurrent.ExecutorsRegistrar.lambda$static$0(ExecutorsRegistrar.java:43)
[AndroidRuntime] at com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda4.get(Unknown Source:0)
[AndroidRuntime] at com.google.firebase.components.Lazy.get(Lazy.java:53)
[AndroidRuntime] at com.google.firebase.concurrent.ExecutorsRegistrar.lambda$getComponents$4(ExecutorsRegistrar.java:80)
[AndroidRuntime] at com.google.firebase.concurrent.ExecutorsRegistrar$$ExternalSyntheticLambda0.create(Unknown Source:0)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:140)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(Unknown Source:4)
[AndroidRuntime] at com.google.firebase.components.Lazy.get(Lazy.java:53)
[AndroidRuntime] at com.google.firebase.components.ComponentContainer.get(ComponentContainer.java:48)
[AndroidRuntime] at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:105)
[AndroidRuntime] at com.google.firebase.installations.FirebaseInstallationsRegistrar.lambda$getComponents$0(FirebaseInstallationsRegistrar.java:53)
[AndroidRuntime] at com.google.firebase.installations.FirebaseInstallationsRegistrar$$ExternalSyntheticLambda0.create(Unknown Source:0)
[AndroidRuntime] at com.google.firebase.tracing.ComponentMonitor.lambda$processRegistrar$0(ComponentMonitor.java:38)
[AndroidRuntime] at com.google.firebase.tracing.ComponentMonitor$$ExternalSyntheticLambda0.create(Unknown Source:4)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:140)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(Unknown Source:4)
[AndroidRuntime] at com.google.firebase.components.Lazy.get(Lazy.java:53)
[AndroidRuntime] at com.google.firebase.components.ComponentContainer.get(ComponentContainer.java:48)
[AndroidRuntime] at com.google.firebase.components.ComponentContainer.get(ComponentContainer.java:24)
[AndroidRuntime] at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:89)
[AndroidRuntime] at com.google.firebase.messaging.FirebaseMessagingRegistrar.lambda$getComponents$0(FirebaseMessagingRegistrar.java:63)
[AndroidRuntime] at com.google.firebase.messaging.FirebaseMessagingRegistrar$$ExternalSyntheticLambda0.create(Unknown Source:0)
[AndroidRuntime] at com.google.firebase.tracing.ComponentMonitor.lambda$processRegistrar$0(ComponentMonitor.java:38)
[AndroidRuntime] at com.google.firebase.tracing.ComponentMonitor$$ExternalSyntheticLambda0.create(Unknown Source:4)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:140)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(Unknown Source:4)
[AndroidRuntime] at com.google.firebase.components.Lazy.get(Lazy.java:53)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime.doInitializeEagerComponents(ComponentRuntime.java:302)
[AndroidRuntime] at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(ComponentRuntime.java:292)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeAllApis(FirebaseApp.java:607)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:300)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:264)
[AndroidRuntime] at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:249)
[AndroidRuntime] at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:69)
[AndroidRuntime] at android.content.ContentProvider.attachInfo(ContentProvider.java:2092)
[AndroidRuntime] at android.content.ContentProvider.attachInfo(ContentProvider.java:2066)
[AndroidRuntime] at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:61)
[AndroidRuntime] at android.app.ActivityThread.installProvider(ActivityThread.java:6983)
[AndroidRuntime] at android.app.ActivityThread.installContentProviders(ActivityThread.java:6528)
[AndroidRuntime] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6445)
[AndroidRuntime] at android.app.ActivityThread.access$1300(ActivityThread.java:219)
[AndroidRuntime] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
[AndroidRuntime] at android.os.Handler.dispatchMessage(Handler.java:107)
[AndroidRuntime] at android.os.Looper.loop(Looper.java:214)
[AndroidRuntime] at android.app.ActivityThread.main(ActivityThread.java:7356)
[AndroidRuntime] at java.lang.reflect.Method.invoke(Native Method)
[AndroidRuntime] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
[AndroidRuntime] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
[AndroidRuntime] Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.ListenableFuture
[AndroidRuntime] ... 49 more
quick update
i was trying to fix #535 in my project previously and keep using <XamarinGoogleGuavaListenableFutureOptOut>true</XamarinGoogleGuavaListenableFutureOptOut>
this tag will take away ListenableFuture which will lead to this issue
removing that tag and using latest Xamarin.Google.Guava
fix the issue
thanks @jpobst