2017-10-04 21 views
-1
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:[email protected]') { 
    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' 

这是我的build.gradle.I面临这个问题。所有com.android.support库必须使用完全相同的版本。发现版本26.0.1-alpha1,,23.0.0。 我试图找出错误,做了一些研究,但我无法弄清楚错误在哪里。请帮助我一样。所有com.android.support库必须使用完全相同的版本。发现版本26.0.1-alpha1,,23.0.0

+0

运行'./gradlew应用:dependencies'然后阅读本https://blog.mindorks.com/avoiding-conflicts-in-android-gradle-dependencies-28e4200ca235。确保所有的支持库版本相同 – Raghunandan

+0

@Raghunandan谢谢 –

回答

3

从您的构建文件,我可以看到你没有包含版本23.0.0。这意味着你包括一些图书馆取决于它。

运行

./gradlew app:dependencies --configuration compile 

列出的依赖关系。从图中你可以看到哪个库正在传递它。然后你就可以排除:

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

谢谢LordRaydenMK –

1

所有支持库的版本必须为buildToolsVersion。如果是26.a.b,则支持库版本必须为26.l.m

我希望有帮助!

+0

谢谢@Malwinder Singh –

相关问题