evollu / react-native-firebase-analytics

React native bridge for firebase analytics
MIT License
206 stars 54 forks source link

Multiple dex files define #47

Open SoldierCorp opened 7 years ago

SoldierCorp commented 7 years ago

Hi,

I cannot get your plugin work because this error:

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zze;

Do you know how to solve this?

Thanks!

NicolasBonduel commented 7 years ago

I had the same issue with the react-native-maps module. It was because I had different version of Google Mobile Services across my modules.

Here is how I fixed it, in my /android/app/build.gradle file:


    compile(project(':react-native-maps')){
        exclude group: 'com.google.android.gms', module: 'play-services-base'
        exclude group: 'com.google.android.gms', module: 'play-services-maps'
    }
    compile 'com.google.android.gms:play-services-base:10.2.0'
    compile 'com.google.android.gms:play-services-maps:10.2.0'

Look into your modules which version of Google Mobile Services are installed and change one of them like above.

afilp commented 7 years ago

@NicolasBonduel We have a similar situation with React Native Intercom, how can we find what code should we exclude there?

image

Thanks!