Gradle is failing on syncing my project in the new Android Studio 2.0

前端 未结 12 1576
春和景丽
春和景丽 2020-11-30 12:49

I have just upgraded (i.e., installed a full new version) my Android Studio from 1.5 to 2.0. The upgrade seemed to go smoothly, but I am having trouble with my project when

相关标签:
12条回答
  • 2020-11-30 13:21

    My problem was different from all answers; gradle distribution url was wrong.. It might be the problem that distributionUrl can be wrong in gradle-wrapper.properties file.

    0 讨论(0)
  • 2020-11-30 13:22

    I also came with the same problem in my application..The application Gradle version is 2.3.3 .I just update the Gradle to 3.0.1 .and the problem is solved.

    0 讨论(0)
  • 2020-11-30 13:24

    For me it was a connection issue, that I have checked my connection is working in the same second I have enabled and disabled offline Gradle, then Android Studio download the needed files

    NB: My Connection was disconnecting and reconnecting many times, so i figured out that this error was caused by the connection specially it was not the same time it takes when trying to sync my Gradle

    0 讨论(0)
  • 2020-11-30 13:26

    I was fallen the same trouble, you mentioned. But I solved it myself. I connected my pc to the internet and rebulit the project using PROJECT>>REBUILT PROJECT.

    Then some downloads could be seen below with the name of jcenter.......

    THEN THE PROBLEM SOLVED...

    0 讨论(0)
  • 2020-11-30 13:29

    I faced the same issue. Make sure that you have made an entry in path in environment variable for gradle

    C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin
    

    After disable offline mode and setting the path in environment variables, the issue was fixed and Gradle was build cleanly.

    0 讨论(0)
  • 2020-11-30 13:33

    I had the same problem as yours. Fortunately, I managed to solve it. You need to go to File >> Settings >> Build, Execution, Deployment >> Build Tools >> Gradle. You need to change the Gradle Home. Mine was "C:/Program Files/Android/Android Studio/gradle/gradle-2.08" and it said the path is invalid. So, just recheck your path in your file explorer and change it. I changed mine to "C:/Program Files/Android/Android Studio/gradle/gradle-2.10".

    0 讨论(0)
提交回复
热议问题