Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAsaf Nakash
3,206 PointsGradle 'FunFacts' project refresh failed. Could not find any version that matches com.android.tools.build:gradle:0.12.+
when opening the android studio in windows 8.1 i get this error. i've tried many things including
- create a new project
- verify firewall settings
- open the fun facts project you provide 4.File -> Invalidate caches / Restart and rebuild.
- add Java\jdk1.7.0_67\bin directory to my PATH system variable.
nothing helped :( here is the full error:
Gradle 'FunFacts' project refresh failed Error:Error:Could not find any version that matches com.android.tools.build:gradle:0.12.+.
Required by:
:FunFacts:unspecified
3 Answers
Ermias Woldegiyorgis
Courses Plus Student 2,849 Pointsyou just have to make this two changes changes inside the build.gradle file. 1
classpath 'com.android.tools.build:gradle:0.12.0'
to
classpath 'com.android.tools.build:gradle:1.0.0' //this is the minimum supported version of gradle now
2
After this you will also have to change runProguard to minifyEnabled
buildTypes {
release {
runProguard false // you have to change 'runProguard' to 'minifyEnabled '
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
runProguard was renamed to minifyEnabled in version 0.14.0.
Source: http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0
Josh English
1,880 PointsI've done the invalidate and rebuild twice and get the same error. Windows 7. Android Studio 0.8.2.
Harry James
14,780 PointsHello there!
Could you please open your build.gradle file and make the following change:
// (-) DELETE THIS LINE: classpath 'com.android.tools.build:gradle:0.12.+'. Replace with below line \/
classpath 'com.android.tools.build:gradle:0.12.0'
This should fix your problem but if it doesn't, please paste your build.gradle contents onto here and I'll take a look :)
Peter Bucciarelli
266 Pointsok i deleted the line and added the new one. now here is what i get in build.gradle file:
apply plugin: 'com.android.application'
android { compileSdkVersion 19 buildToolsVersion "0.12.0"
defaultConfig {
applicationId "ca.slabber.funfacts"
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) }
Asaf Nakash
3,206 PointsAsaf Nakash
3,206 Pointsquick update, I re-tried "File -> Invalidate caches / Restart and rebuild" and after a few times it manage to download everything and resolve it selves.
I keep this discussion open in case somebody else is having the same problem.