android-Gradle:configurationroot项目android studio时出现问题

我从eclipse迁移到android studio。 我创build了一个新项目,我想在genymotion上运行它。 当我按下运行图标,它开始编译,并给我这个错误:

Error:Gradle: A problem occurred configuring root project 'Khabar'. > Could not resolve all dependencies for configuration ':classpath'. > Could not resolve com.android.tools.build:gradle:1.1.0. Required by: :Khabardar:unspecified > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.1.0/gradle-1.1.0.pom'. > d29vzk4ow07wi7.cloudfront.net 

这是我的build.gradle的一些部分:

  apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { applicationId "example.ir.khabar" minSdkVersion 8 targetSdkVersion 20 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } 

在根中build.gradle:

  apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { applicationId "example.ir.khabar" minSdkVersion 8 targetSdkVersion 20 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:20.0.0' compile files('libs/universal-image-loader-1.8.4-with-sources.jar') } 

你可以帮帮我吗? 我的gradle版本是gradle-2.2.1-all

对我来说,解决scheme是添加jcenter的http url而不是https:

 buildscript { repositories { jcenter { url "http://jcenter.bintray.com/" } } dependencies { classpath 'com.android.tools.build:gradle:1.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }