Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
758 views
in Technique[技术] by (71.8m points)

ide - With 0.4.3 Android Studio, error: "Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly"

I have noticed that several people are having issues after upgrading to Android Studio 0.4.3 (problem with 0.4.2 also I believe). My error and debug steps so far are as follows:

The message I see is "Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly" as shown in snapshot below.

Error in Android Studio

I found this thread and following instructions, but I still have the error. I am not able to do the following instruction in the thread: I went into Gradle settings and clicked on "use local Gradle distribution" and pointed it to*: C:/Users/robot_000/.gradle/wrapper/dists/gradle-1.10-all/6vpvhqu0efs1fqmqr2decq1v12/gradle-1.10

Do I need to have a local distribution of gradle? Where do I download it from and where do i put it? How do I now tell Android Studio to use it? (as you can tell, I don't understand how gradle works). Thanks for any help.

Update 1: I found the gradle files on my computer at C:Usershome.gradlewrapperdistsgradle-1.10-all6vpvhqu0efs1fqmqr2decq1v12gradle-1.10, but how do I do do this: "went into Gradle settings and clicked on "use local Gradle distribution" and pointed it to*" (as per THIS THREAD)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Go to File > Settings > Gradle you will end up with this screen for setting up your gradle :

gradle setting

Also make sure you have Google Repository in your Android SDK directory which will be located at :

$SDK_DIRextrasgooglem2repositorycomgoogleandroidgmsplay-services3.1.36

If not do install it from SDK Manager > Extras > Google Repository first.

EDIT :

All your build.gradle(If you are using root level build.gradle to define android gradle plugin version, check in that only) must point to 0.8 version(latest as of now) of android gradle plugin

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

UPDATED :

Mapping is :

 | Android Gradle Plugin |  Gradle Version |
       0.7.+                     1.9
       0.8.+                     1.10

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...