DEX Errors when combining SDK dependancies with navigation in build.gradle
Whether I use 0.7.0-SNAPSHOT or 0.6.3, I get the following dex error:
Error:com.android.tools.r8.errors.CompilationError: Program type already present: com.almeros.android.multitouch.gesturedetectors.RotateGestureDetector
I am not sure what I can do to solve this as I need to use these versions to avoid other issues, namely #437 ` compileSdkVersion 26 buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.cabmyride.driver"
minSdkVersion 21
targetSdkVersion 26
multiDexEnabled true
}
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:5.2.0-beta.2') {
transitive = true
}
compile ('com.mapbox.mapboxsdk:mapbox-android-navigation:0.7.0-SNAPSHOT')
compile ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.7.0-SNAPSHOT') {
transitive = true
}
compile 'com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.2.0-SNAPSHOT'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.2'
annotationProcessor 'android.arch.lifecycle:compiler:1.0.0-alpha9-1'
compile files('lib/acra-4.5.0.jar')
compile 'com.google.android.gms:play-services-places:11.4.2'
compile 'info.hoang8f:android-segmented:1.0.6'
compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile('com.crashlytics.sdk.android:crashlytics:2.5.6@aar') {
transitive = true
}
compile 'com.github.MAXDeliveryNG:slideview:1.0.2'
compile 'com.github.kittinunf.fuel:fuel-android:1.8.0'
compile 'org.jsoup:jsoup:1.8.3'
implementation files('lib/org.apache.http.legacy.jar')
implementation project(':common2')`
@csjames are you still finding this in the latest 0.7.0-SNAPSHOT?
Fixed, I now have an issue where when starting the NavigationActivity through the NavigationLauncher, the route shows, but I can not see instructions, nor does the map rotate with my device.
yes my issue is same as above. i'm using
dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:26.1.0' implementation('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.4@aar') { transitive = true } implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.6.3' implementation('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.6.3') { transitive = true } testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' }
@nileshinfograins Take out the following in your gradle
implementation('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.4@aar') {
transitive = true
}
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.6.3'
implementation('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.6.3') {
transitive = true
}
Replace with only
compile ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.7.1-SNAPSHOT') {
transitive = true
}
@Danny-James has the right suggestion here ^
Noting that the SNAPSHOT will include all the libraries need to create the drop-in navigation experience and will ensure there aren't any conflicts between these libraries.