Unable to run Android app

Jassim Al Rahma 1,541 Reputation points
2023-05-03T09:48:33.5833333+00:00

Hi,

I am trying to run my .NET MAUI Android app but getting the below error.

/Users/jassim/Projects/MyApp/MyApp: Error JAVA0000: Error in /Users/jassim/.nuget/packages/xamarin.google.guava.listenablefuture/1.0.0.11/buildTransitive/net6.0-android31.0/../../jar/guava-listenablefuture.jar:com/google/common/util/concurrent/ListenableFuture.class:
Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: /Users/jassim/.nuget/packages/xamarin.google.guava.listenablefuture/1.0.0.11/buildTransitive/net6.0-android31.0/../../jar/guava-listenablefuture.jar:com/google/common/util/concurrent/ListenableFuture.class, obj/Debug/net7.0-android/lp/225/jl/libs/31DC00DFF80FA577.jar:com/google/common/util/concurrent/ListenableFuture.class
Compilation failed
java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /Users/jassim/.nuget/packages/xamarin.google.guava.listenablefuture/1.0.0.11/buildTransitive/net6.0-android31.0/../../jar/guava-listenablefuture.jar
com/google/common/util/concurrent/ListenableFuture.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/jassim/.nuget/packages/xamarin.google.guava.listenablefuture/1.0.0.11/buildTransitive/net6.0-android31.0/../../jar/guava-listenablefuture.jar:com/google/common/util/concurrent/ListenableFuture.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 com.google.common.util.concurrent.ListenableFuture is defined multiple times: /Users/jassim/.nuget/packages/xamarin.google.guava.listenablefuture/1.0.0.11/buildTransitive/net6.0-android31.0/../../jar/guava-listenablefuture.jar:com/google/common/util/concurrent/ListenableFuture.class, obj/Debug/net7.0-android/lp/225/jl/libs/31DC00DFF80FA577.jar:com/google/common/util/concurrent/ListenableFuture.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/225' is from 'Xamarin.AndroidX.Work.Runtime.aar'. (JAVA0000) (MyApp) java

Thanks,

Jassim

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,056 questions
{count} vote