react-native-iosandroid-0-71 Duplicate class a.a.a found in modules core-1.22.0.aar
Describe the bug In library react-native-iosandroid-0-71, in build.gradle there is string: implementation 'com.google.ar:core:1.22.0', which is the reason of error about duplicate class. If i comment it, app starts but works incorrectly (immediately closes)
To Reproduce Steps to reproduce the behavior:
- install @babylonjs/react-native-iosandroid-0-71
- npx react-native run-android
- See error 'Duplicate class a.a.a found in modules core-1.22.0.aar -> core-1.22.0-runtime (com.google.ar:core:1.22.0) and installreferrer-2.2.aar -> installreferrer-2.2-runtime (com.android.installreferrer:installreferrer:2.2)'
Expected behavior App starts
Meanwhile, I found out how i can fix it, but it seems like not a good solution
configurations {
all*.exclude module: 'installreferrer'
}
Maybe it's possible to check in BRN gradle file if dependency already exists. Can you please try to add these lines in BaylonReactNative gradle and see if it fixes the issue:
dependencies {
implementation('com.google.ar:core:1.22.0') {
exclude group: 'com.google.ar', module: 'core'
}
...
}
Maybe it's possible to check in BRN gradle file if dependency already exists. Can you please try to add these lines in BaylonReactNative gradle and see if it fixes the issue:
dependencies { implementation('com.google.ar:core:1.22.0') { exclude group: 'com.google.ar', module: 'core' } ... }
Ive tried it, and it didn't help.
Do get some results at chechking root projects dependencies?
def parentHasDependency(String group, String name) {
rootProject.configurations.each { config ->
config.dependencies.each { dep ->
if (dep.group == group && dep.name == name) {
return true
}
}
}
return false
}
if (!parentHasDependency('com.google.ar', 'core')) {
dependencies {
implementation 'com.google.ar:core:1.22.0'
}
}