Loading...

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

更新Android Studio之后报错,原来是gradle版本不一致了

配置文件里gradle的版本要一致:

./gradle/wrapper/gradle-wrapper.properties里的版本3.4.1

distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip

版本要和

./build.gradle 里的版本3.4.1一致

classpath 'com.android.tools.build:gradle:3.4.1'

然后报

Gradle DSL method not found: 'google()'

解决办法:将google()修改为:

//      google()修改为下面配置
maven {
            url 'https://maven.google.com/'
name 'Google'
}

There are 3 comments

avatar

The European languages are members of the same family. Their separate existence is a myth. For science, music, sport, etc, Europe uses the same vocabulary. The European languages are members of the same family. Their separate existence is a myth.

Today, 14:55 - Reply
avatar

Europe uses the same vocabulary. The European languages are members of the same family. Their separate existence is a myth.

Today, 15:34 - Reply
avatar

The European languages are members of the same family. Their separate existence is a myth. For science, music, sport, etc, Europe uses the same vocabulary. The European languages are members of the same family. Their separate existence is a myth.

Today, 14:59 - Reply