Android studio报错解决

Android Studio

问题描述"Could not resolve com.android.tools.build:gradle:3.4.1"

希望你是解决了你版本号对应问题之后找到这篇答案~~~

解决办法:

大家看我配置就好,主要是连接问题
build.gradle (your project):

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
   repositories {
       maven { url 'https://maven.aliyun.com/repository/google' }
       maven { url 'https://maven.aliyun.com/repository/jcenter' }
       maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
   }

   dependencies {
       classpath 'com.android.tools.build:gradle:3.4.1'
       
       // NOTE: Do not place your application dependencies here; they belong
       // in the individual module build.gradle files
   }
}

allprojects {
   repositories {
       maven { url 'https://maven.aliyun.com/repository/google' }
       maven { url 'https://maven.aliyun.com/repository/jcenter' }
       maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
       
   }
}

task clean(type: Delete) {
   delete rootProject.buildDir
}

gradle-wrapper.properties:

#Sun Jun 30 08:16:32 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip
(最后一行进行更改)

just so~!
And if you also can not resolve your problem。maybe you can add me for wechat:18333806737,if i have time.


版权声明:本文为yue__shen原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。