Android studio version is as follows:
Android Studio Arctic Fox | 2020.3.1
Build #AI-203.7717.56.2031.7583922, built on July 27, 2021
When I create a new android project, the default version of gradle is 7.0.0, and then java11 is required to run, how to modify the gradle version used by Android studio when creating the project.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
2
Answers
replace with
classpath "com.android.tools.build:gradle:4.1.3"
then you can use with java 8
Please try replacing
distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip
in yourgradle-wrapper.properties
and
classpath 'com.android.tools.build:gradle:4.1.3'
in yourbuild.gradle