Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I cound'nt find buildscript in build.gradle(Project) [duplicate]

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??

like image 987
Hodori Avatar asked Sep 12 '25 07:09

Hodori


1 Answers

For Android Studio Bumblebee they are changed build.gradle structure.

You can add your buildscript above plugins

buildscript {
  dependencies {
    // Add our classpath 
     classpath 'com.google.gms:google-services:4.3.10'
    // Add More 
 }
}
 plugins {
      id 'com.android.application' version '7.1.0' apply false
      id 'com.android.library' version '7.1.0' apply false
}

task clean(type: Delete) {
   delete rootProject.buildDir
}
like image 175
Pratik Fagadiya Avatar answered Sep 14 '25 23:09

Pratik Fagadiya