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 trialCody Emerson
3,373 PointsGradle execution error.
I followed the instructions to install android studio and java. When I create a new project in android studio after the project is built I am prompted Gradle execution error.
This is using the provided zip file. I tried deleting the .gradle file and unzipping it again but the same error occurred. I'm running windows 7.
2 Answers
James Pamplona
10,015 PointsAndroid Studio was just updated to version 1.0. This has caused a few incompatibilities when opening up older projects. If it's complaining about proguard() method not found, open up the 'build.gradle' under the 'app' directory (not the one at the top level project directory) and change the line 'runProguard false' to 'minifyEnabled false'
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '21.1.0'
defaultConfig {
applicationId "com.teamtreehouse.funfacts"
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
// runProguard false // change this old method
minifyEnabled false // to this
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
Cody Emerson
3,373 PointsAfter the project was built a prompt would say along the lines of "gradle execution error. Fatal error closing program" with no gradle log. So I deleted the .Gradle folder and unzipped the Android studio folder to a new path. It ended up working in my C:/Program Files which is strange because I run eclipse out of my ~/ path perfectly fine.
Harry James
14,780 PointsHarry James
14,780 PointsCan you provide the full error log here please?