Android Studio执行sync_with_gradle未找到可信证书sync gradle failed解决经验
build.gradle里写成这样就可以,有时候不行或许是阿里的服务器不行,多sync几次然后重启软件(或者解注释google()然后多sync几次再重启)就神奇的好了。
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { //google() //mavenCentral() maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/repository/mavenCentral' } } dependencies { classpath "com.android.tools.build:gradle:7.0.4" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } task clean(type: Delete) { delete rootProject.buildDir }
本文来自博客园,作者:小汀,转载请注明原文链接:https://www.cnblogs.com/1118zjg/p/16248363.html