'Android Studio Arctic Fox: Problem in Create new Project
I have updated my android studio to Android Studio Arctic Fox but after creating a new project the Gradle configuration has totally changed, and the build Gradle has failed. I have questions: 1-Do settings like ClassPath for Gradle have to be added manually?
Could not resolve all artifacts for configuration ':classpath'.
> Could not find gradle-7.1.1.jar (com.android.tools.build:gradle:7.1.1)
2-this is my build.gradle file, what does apply false means?
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.5.30' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Solution 1:[1]
This issue might be related to missed repository. Please check you fave added at least
google()andmavenCentral()torepositoriessection in your rootbuild.gradle.From the gradle official docs (https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl):
If you have a multi-project build, you probably want to apply plugins to some or all of the subprojects in your build, but not to the root project. The default behavior of the plugins {} block is to immediately resolve and apply the plugins. But, you can use the apply false syntax to tell Gradle not to apply the plugin to the current project and then use the plugins {} block without the version in subprojects' build scripts:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vasily Kabunov |
