Home > Mobile >  When android studio building project has been an error
When android studio building project has been an error

Time:09-29

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

Buildscript {
Repositories {
Maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'}
Maven {url 'https://maven.aliyun.com/repository/google'}
Jcenter ()
}
Dependencies {
The classpath 'com. Android. Tools. Build: gradle: 5.4.1'
//NOTE: Do not place your application dependencies here; They belong
//in the individual module build. Gradle files
}
}

Allprojects {
Repositories {
Maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'}
Maven {url 'https://maven.aliyun.com/repository/google'}
Jcenter ()
}
}

The task the clean (type: Delete) {
The delete rootProject. BuildDir
}
In the build. The gradle dependence as

CodePudding user response:

Dear dalao have similar case or the solution

CodePudding user response:

What is your version AS model gradle: 5.4.1 '?

CodePudding user response:

To some local gradle version

CodePudding user response:

Directly to create a new project, or open the existing projects, compare the gradle version, to use the 5.4.1... Really high ~

CodePudding user response:

refer to the second floor usecf response:
what is your version AS model gradle: 5.4.1 '?
version 3.5.1 track of, but he is behind the distributionUrl=is automatically attached 5.4.1 and download a gradle 5.4.1 package

CodePudding user response:

I downloaded a version with the same 3.5.1 track of gradle package, and then set offline specified gradle will appear

CodePudding user response:

You put your hair the classpath to try 3.5.1 track of

And Google () this don't deleted, it is estimated that several other mirror warehouse no 5.4.1 so wrong
 
Repositories {
Maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'}
Maven {url 'https://jitpack.io'}
Google ()
Jcenter ()
}

CodePudding user response:

The classpath 'com. Android. Tools. Build: gradle: 5.4.1'
You must have gradle: 5.4 gradle? Trouble in a stable (older) try


  • Related