Android Studio installation not working with gradle
I am completely new to Android Studio (especially Gradle) and am having big problems getting Android Studio to work. I downloaded and installed the most recent version of Android Studio (0.8.0). I have set the JDK_HOME variable. However, after creating a new project, I always get the following message:
Error:Unknown host 'jcenter.bintray.com'.
Enable Gradle 'offline mode' and sync project.
Learn about configuring HTTP proxies in Gradle
If I try to compile the project, I get the following message dialog:
After reading the post, I manually downloaded the Gradle binaries (latest, 2.0), extracted it to my local drive, went to Settings, and set the Gradle path to the appropriate directory using the following:
I also tweaked the build.gradle file in the project to point to the latest Gradle 2.0. However, I am now getting the following error message:
Error:A problem occurred configuring root project 'HelloAndroidStudio'.
Could not resolve all dependencies for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:2.0.+.
Required by:
:HelloAndroidStudio:unspecified
Failed to list versions for com.android.tools.build:gradle.
Unable to load Maven meta-data from http://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml.
Could not GET 'http://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml'.
jcenter.bintray.com
Please help someone. First time with Gradle, I tried for so many days without any clue to the problem. Thank.
Change Gradle version to lower and restart Android Studio, you can get it.
Add this to build.gradle classpath 'com.android.tools.build: gradle: 1.1.0'
Setting http_proxy by appearance and behavior -> system settings -> HTTP proxy solved the problem
Navigate to the last classpath in dependencies. For AS 1.5.1, I'll do it like this:
buildscript {
repositories {
jcenter()
}
dependencies {
**classpath 'com.android.tools.build:gradle:1.5.0'**
}
}