无法解析com.android.support:support-v4:[26.0.0,26.1.0)安装存储库并同步项目

时间:2017-08-19 16:14:54

标签: android git

请帮帮我。

Uygulamaöncedençalışıyordu。

Amaşimdiçalışmıyor

以下是gradle sync时的错误消息

enter image description here

以下是我的应用Gradle配置:

   apply plugin: 'com.android.application'
   android {
       compileSdkVersion 25
       buildToolsVersion '25.0.3'
       defaultConfig {
        minSdkVersion 16
        targetSdkVersion 25
        versionCode 1
        versionName '1.0'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),             
  'proguard-rules.txt'
        }
    }
    repositories {
        jcenter()
        mavenCentral()  // GPUImage for Android
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile files('libs/acra-4.5.0.jar')
    compile files('libs/ormlite-android-4.43.jar')
    compile files('libs/ormlite-core-4.43.jar')
    compile files('libs/mysql-connector-java-3.0.17-ga-bin.jar')
    androidTestCompile('com.android.support.test.espresso:espresso-    
    core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
    })
// If you want to use the GPU Filters
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:customtabs:25.3.1'
    testCompile 'junit:junit:4.12'
    compile 'com.onesignal:OneSignal:[3.5.3,4.0.0)'
    compile 'com.google.firebase:firebase-ads:10.0.0'
    compile 'com.google.firebase:firebase-messaging:10.0.0'
    compile 'com.loopj.android:android-async-http:1.4.9'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'jp.wasabeef:glide-transformations:2.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.mikhaellopez:circularimageview:3.0.2'
}
apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:20)

在您的申请中build.gradle

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

然后添加依赖项:

dependencies {
    compile "com.android.support:support-compat:26.0.1"
}

您应该阅读此https://developer.android.com/topic/libraries/support-library/setup.html