2015-04-18 21 views
9

को कॉन्फ़िगर करने में एक समस्या आई, मैंने ग्रहण से एंड्रॉइड स्टूडियो में माइग्रेट किया। मैंने एक नई परियोजना बनाई है और मैं इसे जीनमोशन पर चलाने के लिए चाहता हूं।एंड्रॉइड- ग्रैडल: रूट प्रोजेक्ट एंड्रॉइड स्टूडियो

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') 
} 

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 के कुछ भागों है: जब मैं रन आइकन दबाएं, यह संकलन और मुझे इस त्रुटि देने के लिए शुरू होता है

क्या आप मेरी मदद कर सकते हैं? मेरी Gradle संस्करण Gradle-2.2.1-सब

+0

पोस्ट रूट फ़ोल्डर में build.gradle। –

+0

@GabrieleMariotti उत्तर के लिए धन्यवाद, मैं अपना जवाब संपादित करता हूं और रूट फ़ोल्डर में build.gradle जोड़ता हूं –

+0

आपके पास "बिल्डस्क्रिप्ट" अनुभाग क्या है? –

उत्तर

13

मेरे लिए है, समाधान https के बजाय jcenter के http यूआरएल जोड़ने के लिए, था:

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 
    } 
} 
+0

यह मेरे लिए भी काम किया .. – Sandra

संबंधित मुद्दे