简体   繁体   中英

Android: Dependency issue : Gradle support-v4:18.0.+

On running the dependency task, I have the output as shown below. I tried excluding the module for a few and re-ran the dependency task. Nothing helped.

Below is the dependency log

+--- com.android.support:support-v4:18.0.+ -> 27.0.2
|    +--- com.android.support:support-compat:27.0.2
|    |    +--- com.android.support:support-annotations:27.0.2
|    |    \--- android.arch.lifecycle:runtime:1.0.3
|    |         +--- android.arch.lifecycle:common:1.0.3
|    |         \--- android.arch.core:common:1.0.0
|    +--- com.android.support:support-media-compat:27.0.2
|    |    +--- com.android.support:support-annotations:27.0.2
|    |    \--- com.android.support:support-compat:27.0.2 (*)
|    +--- com.android.support:support-core-utils:27.0.2
|    |    +--- com.android.support:support-annotations:27.0.2
|    |    \--- com.android.support:support-compat:27.0.2 (*)
|    +--- com.android.support:support-core-ui:27.0.2
|    |    +--- com.android.support:support-annotations:27.0.2
|    |    \--- com.android.support:support-compat:27.0.2 (*)
|    \--- com.android.support:support-fragment:27.0.2
|         +--- com.android.support:support-compat:27.0.2 (*)
|         +--- com.android.support:support-core-ui:27.0.2 (*)
|         +--- com.android.support:support-core-utils:27.0.2 (*)
|         \--- com.android.support:support-annotations:27.0.2
+--- com.android.support:palette-v7:27.0.2
|    +--- com.android.support:support-compat:27.0.2 (*)
|    \--- com.android.support:support-core-utils:27.0.2 (*)
+--- com.android.support:multidex:1.0.2
+--- io.reactivex.rxjava2:rxandroid:2.0.1
|    \--- io.reactivex.rxjava2:rxjava:2.0.1 -> 2.1.7
|         \--- org.reactivestreams:reactive-streams:1.0.1
+--- io.reactivex.rxjava2:rxjava:2.1.7 (*)
+--- com.iamsourav.sohoz:sohoz:1.0.0
|    \--- com.android.support:appcompat-v7:24.2.1 -> 27.0.2
|         +--- com.android.support:support-annotations:27.0.2
|         +--- com.android.support:support-core-utils:27.0.2 (*)
|         +--- com.android.support:support-fragment:27.0.2 (*)
|         +--- com.android.support:support-vector-drawable:27.0.2
|         |    +--- com.android.support:support-annotations:27.0.2
|         |    \--- com.android.support:support-compat:27.0.2 (*)
|         \--- com.android.support:animated-vector-drawable:27.0.2
|              +--- com.android.support:support-vector-drawable:27.0.2 (*)
|              \--- com.android.support:support-core-ui:27.0.2 (*)
+--- com.aurelhubert:ahbottomnavigation:2.1.0
|    \--- com.android.support:design:25.3.1 -> 27.0.2
|         +--- com.android.support:support-v4:27.0.2 (*)
|         +--- com.android.support:appcompat-v7:27.0.2 (*)
|         +--- com.android.support:recyclerview-v7:27.0.2
|         |    +--- com.android.support:support-annotations:27.0.2
|         |    +--- com.android.support:support-compat:27.0.2 (*)
|         |    \--- com.android.support:support-core-ui:27.0.2 (*)
|         \--- com.android.support:transition:27.0.2
|              +--- com.android.support:support-annotations:27.0.2
|              \--- com.android.support:support-compat:27.0.2 (*)
+--- de.hdodenhof:circleimageview:2.2.0
+--- jp.wasabeef:recyclerview-animators:2.2.7
|    +--- com.android.support:support-compat:25.4.0 -> 27.0.2 (*)
|    +--- com.android.support:support-core-ui:25.4.0 -> 27.0.2 (*)
|    \--- com.android.support:recyclerview-v7:25.4.0 -> 27.0.2 (*)

Below is the build.gradle(:app) settings added Am i doing something wrong? Can anyone help.

   dependencies {
   compile('com.android.support:support-v4:18.0.+') 
    { 
        exclude module: 'support-v4' 
    }
    compile 'com.android.support:support-v4:27.0.2'
   }
dependencies {  
    compile('com.android.support:support-v4:18.0.+') // this dependency will be fully excluded ...
    { 
        exclude module: 'support-v4' // ... because of this line
    }
    compile 'com.android.support:support-v4:27.0.2' // this dependency will be added with all transitive dependencies
}

If you want just newer version, please try (gradle links the highest version allowed for the target module)

dependencies {
    compile 'com.android.support:support-v4:27.0.2' // this dependency will be added with all transitive dependencies
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM