This is build.gradle(Project) what i knew.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
But my Project’s build.gradle(Project) is that.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I tried to link Firebase with Android, but build.gradle(Project) was different from the file I knew.
I tried to modify it by force, but it didn’t sync…
How can I access the Top-Level Gradle file??
3
Answers
Please Check your Setting.gradle file.
Try
classpath 'com.android.tools.build:gradle:7.1.1'
for Android Studio Bumblebee; Android Studio Arctic Fox still uses AGP up to7.0.4
. In every case, you cannot add version7.0.0
to class-path, but then use version7.1.1
. These version numbers need to match. Most likely the Gradle wrapper also needs to be updated. Maybe think about version control once …because one could basically sum up the question as "I’ve deleted a file, what now?"For Android Studio Bumblebee they are changed
build.gradle
structure.You can add your
buildscript
aboveplugins