RosActivity with Google Maps Android API, UNEXPECTED TOP-LEVEL EXCEPTION
Hi all.
I trying to use an activity which uses the Google Maps Android API alongside with a RosActivity. But I end up with an error like this:
Error:Execution failed for task ':maps:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/cburger/Android/Sdk/build-tools/21.1.2/dx --dex --output /home/cburger/myandroid/src/android_foo/maps/build/intermediates/dex/debug --input-list=/home/cburger/myandroid/src/android_foo/maps/build/intermediates/tmp/dex/debug/inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
I tried to solve it by adding
defaultConfig {
....
multiDexEnabled = true
}
to build.gradle according to this post, but that didn't work and gives me this Application Installation Failed error
Installation failed with message INSTALL_FAILED_CONFLICTING_PROVIDER.
my Gradle file:
dependencies {
compile 'org.ros.android_core:android_10:[0.2,0.3)'
compile 'org.ros.android_core:android_15:[0.2,0.3)'
compile 'com.google.android.gms:play-services:8.3.0' //used for the google maps API
compile 'com.android.support:appcompat-v7:[15.,)' //used for the google maps API
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled = true
}
}
has anyone done this before or any hints on how to solve this problem?
Thanks.