当前位置:   article > 正文

关于解决Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly

gradle project sync failed. basic functionality (e.g. editing, debugging) wi

刚刚安装好Android studio后,可能会出现gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly,本人也是弄了一天才弄明白,一把辛酸一把泪,下面这些是我整理好的一些大佬的解决方案,这几个方法都可以试试,最中要的就是在gradle系列文件夹下面要拥有gradle-7.0.2-all.zip这个包,如图

然后就是要在wrapper.properties 文件下添加路径,如图(第二行那个)注意一定是-all,有些可能是-bin,我就是将-bin改成-all就行了

 最后就是需要在build.gradle配置代码,这是我整个的代码,你们对比着添加

  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. maven { url 'https://maven.aliyun.com/repository/public' }
  5. maven { url 'https://maven.aliyun.com/repository/public' }
  6. maven { url 'https://maven.aliyun.com/repository/google' }
  7. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  8. google()
  9. mavenCentral()
  10. jcenter()
  11. }
  12. dependencies {
  13. classpath "com.android.tools.build:gradle:7.0.2"
  14. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
  15. }
  16. }
  17. task clean(type: Delete) {
  18. delete rootProject.buildDir
  19. }

最后就可以解决了,希望以上教程能帮助大家

大佬参考

gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly_Angela_journey-CSDN博客

AndroidStudio 安装Gradle问题gradle project sync failed.Basic functionality(e.g.editing,debugging) will n_runrun117的博客-CSDN博客

 【已解决】Android Studio下,gradle project sync
failed 错误_一杯刘-CSDN博客




解决Android Studio提示gradle project sync failed报错的解决方法-百度网盘下载-Java自学者论坛 - Powered by Discuz!
 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/269995
推荐阅读
相关标签
  

闽ICP备14008679号