你好,我似乎在我的gradle中找不到13.0.0版本。我也在gradle中使用以下代码将其设置为23.4.0,但它不会改变任何东西。
THanks:
apply plugin: 'com.android.application'
android {
    buildTypes {
    compileSdkVersion 23
    buildToolsVersion '25.0.0'
    defaultConfig {
        applicationId "com.parse.starter"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        /*dexOptions {
            javaMaxHeapSize "4g";;-
        }*/
}
    buildToolsVersion '25.0.0'
}
ext {
    supportLibraryVersion = '23.4.0'
    playServicesVersion = '3.2.65'
    boltVersion = '1.4.0'
}
subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.jar == 'com.android.support'
                    && !details.requested.name.contains('multidex')) {
                details.useVersion "$supportLibraryVersion"
            }
            if (details.requested.jar == 'com.google.android.gms'){
                details.useVersion "playServicesVersion"
            }
            if (details.requested.jar == 'com.android.support:animated-vector-drawable'){
                details.useVersion "$supportLibraryVersion"
            }
            if (details.requested.jar == 'com.parse.bolts:bolts-tasks'){
                details.useVersion "$boltVersion"
            }
        }
    }
}
configurations.all {
    resolutionStrategy {
        // fail eagerly on version conflict (includes transitive dependencies)
        // e.g. multiple different versions of the same dependency (group and name are equal)
        failOnVersionConflict()
        // prefer modules that are part of this build (multi-project or composite build) over external modules
        preferProjectModules()
        dependencySubstitution {
            substitute module('com.android.support:animated-vector-drawable:23.4.0') with module('com.android.support:animated-vector-drawable:23.0.0')
            //substitute module('com.google.android.gms:play-services:3.2.65') with module('com.google.android.gms:play-services:9.4.0')
            substitute module('com.android.support:appcompat-v7:13.0.0') with module('com.android.support:appcompat-v7:23.4.0')
        }
    }}
dependencies {
    compile "com.android.support:appcompat-v7:$supportLibraryVersion"
    compile "com.google.android.gms:play-services:$playServicesVersion"
    compile "com.google.android.gms:play-services-maps:$playServicesVersion"
    compile "com.parse.bolts:bolts-tasks:$boltVersion"
    compile 'com.parse:parse-android:1.13.0'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.maps.android:android-maps-utils:0.3'
    compile 'com.android.support:support-v4:13.0.0'
}错误日志:发现以下模块之间存在冲突:- com.android.support:support-v4:13.0.0 - com.android.support:support-v4:23.4.0
发布于 2017-05-06 20:40:16
删除compile 'com.android.support:support-v4:13.0.0'内部依赖项。您有两个版本的support-v4工件。
dependencies {
    compile "com.android.support:appcompat-v7:$supportLibraryVersion"
    compile "com.google.android.gms:play-services:$playServicesVersion"
    compile "com.google.android.gms:play-services-maps:$playServicesVersion"
    compile "com.parse.bolts:bolts-tasks:$boltVersion"
    compile 'com.parse:parse-android:1.13.0'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.maps.android:android-maps-utils:0.3'
    compile 'com.android.support:support-v4:13.0.0'  // <-- This is your version 13.1.0
}https://stackoverflow.com/questions/43820505
复制相似问题