I tried to enable multidex in gradle file, But I faced the following error:
I NEVER EVER have used something with version 25.2.0 ! Why it keeps nagging about this conflict? I checked several times. And I didn't find any usage of 25.2.0 libraries in my project.
Full list of dependencies from app module:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(path: ':vaslibrary')
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.jaredrummler:material-spinner:1.1.0'
compile 'com.android.support:multidex:1.0.1'
testCompile 'junit:junit:4.12'
}
In vaslibrary I have these dependencies:
dependencies {
compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
testCompile 'junit:junit:4.12'
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile('com.squareup.retrofit2:converter-simplexml:2.1.0') {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'io.fotoapparat.fotoapparat:library:1.0.4'
compile 'me.dm7.barcodescanner:zxing:1.9.3'
compile 'com.google.android.gms:play-services-maps:10.2.4'
compile 'com.google.android.gms:play-services-location:10.2.4'
compile 'com.google.firebase:firebase-core:10.2.4'
compile 'com.google.firebase:firebase-messaging:10.2.4'
compile 'io.nlopez.smartlocation:library:3.3.1'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
compile 'com.hlab.fabrevealmenu:fab-reveal-menu:1.0.2'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:gridlayout-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.jakewharton.timber:timber:4.5.1'
compile 'com.mohamadamin:persianmaterialdatetimepicker:1.2.1'
compile files('libs/BixolonPrinterV230.jar')
compile 'com.github.mancj:SlideUp-Android:2.2.3'
}
Use the gradle dependencies
command like this:
./gradlew app:dependencies
(app being the name of your app module) to find out which dependencies rely on conflicting versions of another dependency (transitive dependencies).
In your case, the library io.nlopez.smartlocation:library:3.3.1
has a transitive dependency on the support library with version 25.2.0
which is conflicting with support library version 25.3.1
transitively used by other dependencies.
Resolve the issue by telling the dependency that has a transitive dependency on a conflicting version to exclude that conflicting dependency with:
compile ('io.nlopez.smartlocation:library:3.3.1') {
exclude group: 'com.android.support'
}
I left some of your dependencies out in my test run, you might need to exclude more.