Android Question ListenableFuture is defined multiple times

Ilya G.

Active Member
Licensed User
Longtime User
I am trying to compile one of the old projects but I am getting the following error:

B4X:
B4A Version: 12.20
Parsing code.    (0.71s)
    Java Version: 11
Building folders structure.    (0.31s)
Compiling code.    (0.42s)
Compiling layouts code.    (0.03s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (1.24s)
Linking resources    (6.46s)
Compiling generated Java code.    (0.52s)
Finding libraries that need to be dexed.    (0.06s)
Dex code    (1.85s)
Dex merge    Error
Error in D:\ANDROID\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63785595109973\dex_v1\guava-30.1.1.zip:classes.dex:
Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: D:\ANDROID\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63785595109973\dex_v1\guava-30.1.1.zip:classes.dex, D:\ANDROID\tools\..\extras\b4a_local\unpacked-com.google.guava-listenablefuture-63810054328000\dex_v1\com.google.guava-listenablefuture.zip:classes.dex
Compilation failed
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: D:\ANDROID\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63785595109973\dex_v1\guava-30.1.1.zip:classes.dex
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:98)
    at com.android.tools.r8.D8.main(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: D:\ANDROID\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63785595109973\dex_v1\guava-30.1.1.zip:classes.dex
    at Version.fakeStackEntry(Version_3.3.20-dev+aosp1.java:0)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:75)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:28)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:27)
    at com.android.tools.r8.internal.vj.b(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:2)
    at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:22)
    at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:17)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:85)
    ... 1 more
Caused by: com.android.tools.r8.internal.f: Type com.google.common.util.concurrent.ListenableFuture is defined multiple times: D:\ANDROID\tools\..\extras\b4a_local\unpacked-guava-30.1.1-63785595109973\dex_v1\guava-30.1.1.zip:classes.dex, D:\ANDROID\tools\..\extras\b4a_local\unpacked-com.google.guava-listenablefuture-63810054328000\dex_v1\com.google.guava-listenablefuture.zip:classes.dex
    at com.android.tools.r8.internal.YS.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:14)
    at com.android.tools.r8.internal.YS.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:22)
    at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:36)
    at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:10)
    at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2048)
    at com.android.tools.r8.internal.cN.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:6)
    at com.android.tools.r8.graph.E2$a.e(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:4)
    at com.android.tools.r8.dex.b.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:105)
    at com.android.tools.r8.dex.b.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:28)
    at com.android.tools.r8.D8.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:25)
    at com.android.tools.r8.D8.d(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:609)
    at com.android.tools.r8.D8.c(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:1)
    at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:24)
    ... 5 more
 

Ilya G.

Active Member
Licensed User
Longtime User
It doesn't seem to help
 

Attachments

  • 1675761668351.png
    1675761668351.png
    46.7 KB · Views: 143
Upvote 0

agraham

Expert
Licensed User
Longtime User
This is an aside to your problem but I see you are using the GPS library. It no longer provides location information on the latest Android releases and you should switch to my GNNS library. See the paragraph in bold at the end of the first post here.
 
Upvote 0
Top