无法同步Gradle Android Studio 3.1.4

时间:2018-08-17 11:39:24

标签: java android xml android-studio-3.1.4

我使用gradle 4.4安装了android studio 3.1.4,但无法同步它, 我阅读了有关同步的所有主题,但是从所有依赖项中都遇到了错误,我添加了maven链接,mavencentral,通过编译更改实现,但无济于事

这些是错误:

  

无法解决以下方面的依赖性   ':app @ debugAndroidTest / compileClasspath':无法解析   com.android.support.test:runner:1.0.1。

     

无法解决以下方面的依赖性   ':app @ debugAndroidTest / compileClasspath':无法解析   com.android.support.test.espresso:espresso-core:3.0.1。

     

无法解决以下方面的依赖性   ':app @ releaseUnitTest / compileClasspath':无法解析   com.android.support:appcompat-v7:28.0.0-rc01。

     

无法解决以下方面的依赖性   ':app @ releaseUnitTest / compileClasspath':无法解析   com.android.support.constraint:约束布局:1.1.2。

这是我的gradle.build:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "comcooking.wikiyar.myapplication"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

0 个答案:

没有答案