optimizely / android-sdk

Android SDK for Optimizely Feature Experimentation and Optimizely Full Stack (legacy)
https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/android-sdk
Apache License 2.0
55 stars 39 forks source link

1.5.0-RC Multiple Dex Files define class #161

Closed marcoRS closed 6 years ago

marcoRS commented 7 years ago

I am seeing the following error in our project:

Caused by: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Caused by: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
        at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:72)
        at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:36)
Caused by: com.android.dex.DexException: Multiple dex files define Lcom/noveogroup/android/log/AbstractLogger;

Optimizely seems to be the only library with this dependency so I don't know why the clash dex merging.

thomaszurkan-optimizely commented 7 years ago

If you look at the release 1.5 test-app, it shows how to remove the noveogroup as a compile exclude. That should do it. But, I'm not sure why you would get double define there. It is only included once in Optimizely Android SDK.

thomaszurkan-optimizely commented 7 years ago

@marcoRS how are you building?

thomaszurkan-optimizely commented 7 years ago

By the way, I saw this error and it was fixed by clearing my .gradle cache.

thomaszurkan-optimizely commented 7 years ago

@marcoRS feel free to open this back up if you think I am closing it in error. Thanks!

marcoRS commented 7 years ago

Cleaning the Gradle cache folder did not work for me. I excluded the library the way it is excluded in the test-app and that seemed to do the trick. Thanks!

thomaszurkan-optimizely commented 7 years ago

@marcoRS, thank you! Also, can you upgrade to 1.5.1. The proguard rules were a little to relaxed.

thomaszurkan-optimizely commented 6 years ago

Please use 1.5.1