Multi dex files define Lcom/google/gdata/util/common/base/Escaper

513 Views Asked by At

Multi dex files define Lcom/google/gdata/util/common/base/Escaper

I am stuck with the above error. The error ocured after i have added a dependency to the UserVoice SDK

compile 'com.uservoice:uservoice-android-sdk:+'

since i added this dependency i am unable to run my Android project.

I have read about the jarjar command could probably solve this issue. But since the dependency are .aar librararies i do not know what could be the possible solution

any help is greatly appreciated

List of other depedencies:

 compile('com.crashlytics.sdk.android:crashlytics:2.1.0@aar') {
        transitive = true;
    }
    compile('com.twitter.sdk.android:twitter:1.1.0@aar') {
        transitive = true;
    }
    compile 'com.android.support:support-v4:21.0.0'
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.google.android.gms:play-services-wearable:+'
    compile 'com.github.manuelpeinado.fadingactionbar:fadingactionbar-abc:3.1.2'
    compile 'com.squareup.retrofit:retrofit:1.7.1'
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
    compile 'com.squareup.okhttp:okhttp:2.0.0'
    compile 'com.jakewharton:butterknife:5.1.2'
    compile 'com.squareup.picasso:picasso:2.3.4'
    compile 'com.melnykov:floatingactionbutton:1.0.5'
    compile 'com.balysv.materialmenu:material-menu-abc:1.+'
    compile 'de.keyboardsurfer.android.widget:crouton:1.8.5@aar'
    compile 'com.facebook.android:facebook-android-sdk:3.20.0'
    compile 'com.joanzapata.android:android-iconify:1.0.8'
    compile 'com.squareup:otto:1.3.5'
    compile 'com.android.support:recyclerview-v7:21.+'
    compile 'com.android.support:cardview-v7:21.+'

Gradle depdencies pastebin: http://pastebin.com/0m6b8Wyi

1

There are 1 best solutions below

3
Bobbake4 On

The problem you are having is caused by the fact that you have two dependencies that include the Escaper class. These are most likely dependencies of your dependencies so it's not obvious which one includes that class. You can be sure that com.uservoice:uservoice-android-sdk:+ includes the class Escaper as that is when your error occurs.

You can fix this problem by excluding the dependency from one of your compile dependencies. Take a look at the Gradle docs and scroll down to where it talks about "Excluding transitive dependencies". One thing to be careful of is the fact that the dependencies might be different versions but contain the same class. You should confirm that both libraries will work with the same version of the Escaper class.