Android Question Error: Type kotlinx.coroutines.AwaitAll is defined multiple times

falbertini

Member
Licensed User
Longtime User
Hello,
in a b4a android app, I am using a library that uses kotlin and compile well with B4a 12.8.
I have changed my pc and in the new pc, with B4a 13.1, i am not able to compile only this app with kotlin (others app compile welll)

This is how the additional jars are defined:

B4X:
#AdditionalJar: com.google.android.gms:play-services-maps

#AdditionalJar: kotlin-stdlib-1.3.72
#AdditionalJar: kotlin-stdlib-jdk7-1.3.72
#AdditionalJar: kotlinx-coroutines-core-1.3.6
#AdditionalJar: kotlinx-coroutines-android-1.3.6

#ExcludedLib: kotlin-stdlib-1.6.10

#AdditionalJar: androidx.biometric:biometric
#Extends: android.support.v4.app.FragmentActivity

#AdditionalJar: core-1.58.0.0 
    
#Extends: android.support.v7.app.AppCompatActivity

The error I get while compiling:
B4X:
C:\AndroidB4A\tools\..\extras\b4a_local\unpacked-kotlinx-coroutines-core-1.3.6-63750900598458\dex_v1\kotlinx-coroutines-core-1.3.6.zip:classes.dex:
Type kotlinx.coroutines.AwaitAll is defined multiple times: C:\AndroidB4A\tools\..\extras\b4a_local\unpacked-kotlinx-coroutines-core-1.3.6-63750900598458\dex_v1\kotlinx-coroutines-core-1.3.6.zip:classes.dex, C:\AndroidB4A\tools\..\extras\b4a_local\unpacked-org.jetbrains.kotlinx-kotlinx-coroutines-core-jvm-63872351718000\dex_v1\org.jetbrains.kotlinx-kotlinx-coroutines-core-jvm.zip:classes.dex
Compilation failed

How can I fix this error?
 

falbertini

Member
Licensed User
Longtime User
Removing all the kotlin lines the app is compiled well.
But without it can I have some isseus with bluetooth connection with kotlin layer?
I cannot try it now, because I have not the bluetooth device to connect to.
These lines aren't useful? Thanks a lot
 
Upvote 0
Top