Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
191 views
in Technique[技术] by (71.8m points)

All com.android.support libraries must use the exact same version. Found versions 26.0.1-alpha1, ,23.0.0

 apply plugin: 'com.android.application'
     apply plugin: 'io.fabric'

repositories {
               maven { url 'https://maven.fabric.io/public' }
             }
 android {
compileSdkVersion 26
buildToolsVersion "26.0.1"

dexOptions {
    incremental true

    javaMaxHeapSize "4g"
}

defaultConfig {
    applicationId "com.textmaxx"
    minSdkVersion 15
    targetSdkVersion 26
    versionCode 10
    versionName "1.9"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
packagingOptions {
    exclude 'META-INF/services/javax.annotation.processing.Processor'
}
 }

      dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
     testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:26.+'
     compile 'com.android.volley:volley:1.0.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.squareup.picasso:picasso:2.5.0'

compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.android.support:multidex:1.0.1'
compile 'io.realm:realm-android:0.87.4'
compile 'com.android.support:recyclerview-v7:26.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'

compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.pnikosis:materialish-progress:1.7'
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.intuit.sdp:sdp-android:1.0.3'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'

compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.jakewharton:process-phoenix:2.0.0'

compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
    transitive = true;

    compile("com.github.hotchemi:permissionsdispatcher:2.4.0") {
        exclude module: "support-v13"
    }
    annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:2.4.0"
}

 }
  apply plugin: 'com.google.gms.google-services'

This is my build.gradle.I am facing this issue. All com.android.support libraries must use the exact same version. Found versions 26.0.1-alpha1, ,23.0.0. I am trying to find out the error, did some research as well, but I was not able to figure out where the error is. Please help me regarding the same.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

From your build file I can see you didn't include the version 23.0.0. That mean some library you included depends on it.

Run

./gradlew app:dependencies --configuration compile

to list the dependencies. From the graph you can see which library is pulling it transitively. Then you can exclude it:

dependencies {
  compile ('<DEPENDENCY>') {
    exclude group: "<GROUP>", module: "<MODULE>"
  }
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...