0

How to remove support-v4:22.2.0 from Play-services-maps? Because it causing the following error:

com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;

I already tried:

compile('com.google.android.gms:play-services-maps:7.8.0') {
        exclude module: 'support-v4'
    }

gradlew app:dependencies:

compile - Classpath for compiling the main sources.
+--- project :library_refreshaction_appcompat
+--- project :library_swipelistview
|    +--- com.nineoldandroids:library:2.4.0
|    \--- com.android.support:support-v4:23.0.0
|         \--- com.android.support:support-annotations:23.0.0
+--- project :library_numberpicker
+--- project :library - viewpageindicator2.4
|    \--- com.android.support:support-v4:23.0.0 (*)
+--- project :library_handmark_pull
+--- project :library_enhancedlistview
|    \--- com.nineoldandroids:library:2.4.0
+--- project :library_photoView
+--- project :library
+--- project :library_imageSlider
|    +--- com.android.support:support-v4:23.0.0 (*)
|    +--- com.nineoldandroids:library:2.4.0
|    \--- com.squareup.picasso:picasso:2.3.4
+--- project :library_cards
+--- project :library_animations
|    \--- project :library_easing_animation
|         \--- com.nineoldandroids:library:2.4.0
+--- project :library_PagerSliding
|    \--- com.android.support:support-v4:23.0.0 (*)
+--- project :library_ParallaxScroll
+--- project :library_HeaderListView
|    \--- com.android.support:appcompat-v7:23.0.0
|         \--- com.android.support:support-v4:23.0.0 (*)
+--- project :library_SwitchButton
+--- project :listviewanimation-core
|    +--- com.nineoldandroids:library:2.4.0
|    \--- com.android.support:support-v4:23.0.0 (*)
+--- com.nineoldandroids:library:2.4.0
+--- com.squareup.picasso:picasso:2.3.4
+--- com.commonsware.cwac:endless:1.2.3
|    \--- com.commonsware.cwac:adapter:1.0.1
+--- com.commonsware.cwac:merge:1.1.1
|    \--- com.commonsware.cwac:sacklist:1.0.+ -> 1.0.2
+--- com.google.android.gms:play-services-maps:7.8.0
|    \--- com.google.android.gms:play-services-base:7.8.0
|         \--- com.android.support:support-v4:22.2.0 -> 23.0.0 (*)
+--- com.google.android.gms:play-services-analytics:7.8.0
|    \--- com.google.android.gms:play-services-base:7.8.0 (*)
+--- com.android.support:support-v4:23.0.0 (*)
+--- com.android.support:appcompat-v7:23.0.0 (*)
+--- com.android.support:recyclerview-v7:23.0.0
|    +--- com.android.support:support-annotations:23.0.0
|    \--- com.android.support:support-v4:23.0.0 (*)
+--- com.android.support:cardview-v7:23.0.0
+--- com.squareup.retrofit:retrofit:1.9.0
|    \--- com.google.code.gson:gson:2.3.1
+--- com.facebook.android:facebook-android-sdk:4.5.0
|    +--- com.parse.bolts:bolts-android:1.2.0
|    \--- com.android.support:support-v4:[22,23) -> 23.0.0 (*)
+--- com.nostra13.universalimageloader:parent:1.9.4
+--- com.github.rampo.updatechecker:library:2.1.8
+--- com.google.zxing:core:3.2.1
+--- com.squareup.okio:okio:1.5.0
+--- de.hdodenhof:circleimageview:1.3.0
+--- com.loopj.android:android-async-http:1.4.8
+--- :sdk-1.2.0.2:
\--- com.crashlytics.sdk.android:crashlytics:2.5.0
     +--- io.fabric.sdk.android:fabric:1.3.5
     +--- com.crashlytics.sdk.android:crashlytics-core:2.3.3
     +--- com.crashlytics.sdk.android:answers:1.3.0
     |    \--- io.fabric.sdk.android:fabric:1.3.5
     \--- com.crashlytics.sdk.android:beta:1.1.3
Marckaraujo
  • 7,422
  • 11
  • 59
  • 97
  • That wouldn't seem to be your problem, as the dependencies report shows that `play-services-maps:7.8.0` has its dependency satisfied by `support-v4:23.0.0`, as the rest of your dependencies use. How have you determined that this specific library is the source of your difficulty? – CommonsWare Aug 31 '15 at 17:49
  • @CommonsWare, As said here: http://stackoverflow.com/questions/26342444/multiple-dex-files-define-landroid-support-annotation-animres, the problem is with support-annotations, but I don't use this library, it is only included by support-v4 and recyclerview-v7. What could be then? – Marckaraujo Aug 31 '15 at 17:52
  • "it is only included by support-v4 and recyclerview-v7" -- what is strange about your dependency report is that `support-v4` is not showing the `support-annotations` transitive dependency, though according to its POM there is one. There should be a `+--- com.android.support:support-annotations:23.0.0` line under the `support-v4` dependency, just like there is for the `recyclerview-v7` one. I cannot explain the behavior that you are seeing. – CommonsWare Aug 31 '15 at 17:58
  • @CommonsWare, I just backward to buildToolsVersion '22.0.1' and all support libs to 22.0.0 and now it works, but its not a valid solution. – Marckaraujo Aug 31 '15 at 19:51

0 Answers0