idea配置gradle项目时显示同步失败

2020年8月31日11:41:27 评论 3 626字阅读2分5秒

idea配置gradle项目时显示同步失败

因为gradle的官网在国外,众所周知,可能会下载失败,然后build的时候就会显示同步失败

根据StackOverflow上的方法解决的,看了之后发现如此简单,,,

原回答如下:

I'm assuming I can answer my own question.... This worked for me.

  1. File -> Invalidate caches / Restart
  2. Shutdown Android Studio
  3. Rename/remove .gradle folder in the user home directory
  4. Restart Android Studio let it download all the Gradle stuff it needs
  5. Gradle build success !
  6. Rebuild project.... success !

Out of curiousity I compared the structure of the old .gradle and the new one... they were pretty different !

So I'll see how 0.4.2 goes :)

对应链接:https://stackoverflow.com/questions/21066598/android-studio-0-4-2-gradle-project-sync-failed-error

翻译一下,就是去找到C:\Users\HP(此处HP为你的Windows用户名)

删除.gradle文件夹,再重新build即可!!!

 

  • 本文由 发表于 2020年8月31日11:41:27
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接