Error running android: Gradle project sync failed. Please fix your project and try again

前端 未结 30 2974
南方客
南方客 2020-11-30 18:32

Android Studio (1.2 RC0) keeps telling me Error running android: Gradle project sync failed. Please fix your project and try again. How can I find out what th

相关标签:
30条回答
  • 2020-11-30 18:58

    It took me some time to resolve this.

    • Updated SDK Build-Tool [Didn't help]
    • Updated CMake [Didn't help]
    • Updated Android SDK Platform-Tools [Didn't help]
    • Updated Android SDK Tools [Didn't help]
    • Updated NDK [Problem solved]

    There was a reason, I didn't want to update NDK. When all else failed, I updated NDK and that did the trick.

    0 讨论(0)
  • 2020-11-30 19:00

    Delete .gradle folder(root directory) and build folder(project directory) and then invalidate caches/restart android studio, run your project again hopefully it will work. It might take some time for the background tasks. In some countries, you may need to turn on the VPN to download.

    0 讨论(0)
  • 2020-11-30 19:01

    I had the same issue yesterday. After opening the "Android SDK Manager", updating all packages and restarting Android Studio, the project compiled again.

    0 讨论(0)
  • 2020-11-30 19:01

    I ran into the same issue, but then did the following, and my issue was resolved:

    • updated Gradle
    • installed the latest version of Android studio (mine was out of date)

    And that solved my problem.

    Note: It also helped me to click on the event log, because it has more detailed info about errors. https://developer.android.com/studio/releases/gradle-plugin#updating-plugin also has great info.

    0 讨论(0)
  • 2020-11-30 19:01

    Its because the gradle is not synced because of many reasons.

    Go to project folder and remove .gradle folder and start sync. It will work

    0 讨论(0)
  • 2020-11-30 19:04

    I got this problem on Android studio, there in either sync or build square were this link like blue text about this issue, press that button and it download something that fix this problem

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