连接到https://jcenter.bintray.com拒绝错误

时间:2016-08-30 07:46:51

标签: android gradle

当我尝试使用Android SDK Build-tools版本"24.0.2"创建新模块时,会出现以下错误:

Error:A problem occurred configuring project ':app'.
> A problem occurred configuring project ':audiowidget'.
   > Could not download support-media-compat.aar (com.android.support:support-media-compat:24.2.0)
      > Could not get resource 'https://jcenter.bintray.com/com/android/support/support-media-compat/24.2.0/support-media-compat-24.2.0.aar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/support/support-media-compat/24.2.0/support-media-compat-24.2.0.aar'.
            > Connection to https://jcenter.bintray.com refused

完整的gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.2"

    defaultConfig {
        applicationId "com.tabaneshahr.myapplication"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.2.0'
}

android SDK已更新为Android SDK Build-tools的最新版本 - > 24.0.2 enter image description here

enter image description here

0 个答案:

没有答案