0
votes

can't resolve error. gradle project sync fail, Android Studio 0.4.6 download

The following is the set up, PLEASE ask for more info if needed. I had it working for 3 months until the upgrade 0.5.4 NOW can't resolve this on a reinstall from scratch.

OS windows 7 x64

Gradle build:

buildscript {
    repositories {
        mavenCentral()
    }
   dependencies {
        classpath 'com.android.tools.build:gradle:0.8.+'
    }
}
allprojects {
    repositories {
        mavenCentral()
    }
}

Gradle build project:

apply plugin: 'android'
android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"
    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
   }
}
dependencies {
    compile 'com.android.support:support-v4:19.0.1'
    compile 'com.android.support:appcompat-v7:+'
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

Wrapper :

  1. distributionBase=GRADLE_USER_HOME
  2. distributionPath=wrapper/dists
  3. zipStoreBase=GRADLE_USER_HOME
  4. zipStorePath=wrapper/dists
  5. distributionUrl=http://services.gradle.org/distributions/gradle-1.10-all.zip

System paths:

  1. ANDROID_HOME C:\Program Files (x86)\Android\android-studio\sdk
  2. CLASS_PATH .;%JAVA_HOME%\lib\tool.jar
  3. JAVA_HOME C:\Java\jdk1.7.0_45
  4. JDK_HOME C:\Java\jdk1.7.0_45
  5. Path ...... %JAVA_HOME%\bin

Question 1: to resolve the gradle sync fail

Question 2: the SDK manager is missing and not working from this Android studio build "Y/N"

1

1 Answers

1
votes

Change this line...!!

dependencies {
    classpath 'com.android.tools.build:gradle:0.8.+'
}

for this

dependencies {
    classpath 'com.android.tools.build:gradle:0.9.+'
}

and also android studio is now on its version 0.5.4 so I recomed you to get the latest update... because it include a lot of patches... please let me know if this helped you

EDIT

on android studio now you should be able to see a little window that is call gradle console... once you try to sync the gradle project you will see a link that says... you need to update the build.gradle or something like that...

enter image description here