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").
– Ighor Augusto
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 :/
– Mukotoshi
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 forjcenter
formavenCentral
also.– Wakim