Could not find any version that Matches com.android.tools.build:Radle:0.12.+

Asked

Viewed 179 times

1

I installed Android Studio, installed JDK, configured the environment variables (JAVA_HOME, JDK_HOME, PATH). I configured my proxy (I did the test and the connection works), and when trying to create a "Blank Activity" I get the following error:

Error:Could not find any version that Matches com.android.tools.build:Gradle:0.12.+. Required by: :mteste:unspecified

build.Radle of the project

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.+'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

build.Radle of the application

apply plugin: 'com.android.application'

android {
    compileSdkVersion 'android-L'
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.br.mteste"
        minSdkVersion 11
        targetSdkVersion 'L'
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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

Gradle-wrapper.properties

#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip

I did not make any changes to the gradles (I mean, of course I tried several changes, but there was no success in correcting the error so I went back to the standard). Does anyone know how to fix this? I searched all day yesterday and found nothing to fix it... :/

From now on, thank you.

  • Have you tried opening the SDK manager and updating all packages? I see you are using the v7 support api, so you should have this package installed. Besides that you should also have the build-tools of the version that is declared in Gradle (which in the case is the 20), and also the packages of the version that you are compiling (which in the case is "android L").

  • As for the SDK Manager, I find it strange that only those that are installed appear (I can’t see any other, even asking to display all the others). About the packages, I have here the folders "android-20" in "plataforms" and "android-4.4W" in "build-tools", I also found the "appcompat-v7" in "android-studio sdk extras android m2repository with android support"... Is that right? I apologize for the ignorance, but in courses and booklets they do not teach any of this :/

  • I don’t think the mistake is Gradle, be careful when using the SDK L Preview, take a look at this question that may help resolve http://answall.com/questions/25945/failure-install-failed-older-sdk. Try switching the repository for jcenter for mavenCentral also.

1 answer

0


Try to remove the '.+' sign from the Gradle classhpath. There is a similar question answered in English: similar problem

  • I have tried several amendments regarding the version number (0.12, 0.12.0, 1.12, among many others, all unsuccessful). I found the question of the link you passed, but I could not find the answer, I entered the link provided by the man who answered, but I did not find anything that could help me there :(

Browser other questions tagged

You are not signed in. Login or sign up in order to post.