title: Apply script build.gradle error when adding firebase dependencies to an android app
body: <p>I am adding firebase to my android application. After adding dependecies  <code>classpath 'com.google.gms:google-services:4.3.0'</code> and implementation <code>'com.google.firebase:firebase-database:18.0.1'</code> and plugins that is apply <code>plugin: 'com.google.gms.google-services'</code> and trying to sync it brings an "Apply script build.gradle" error</p>
  
  <p>I have updated my google repositories and have a good internet connection</p>
  
  <pre><code>apply plugin: 'com.google.gms.google-services' 
  
  dependencies {
          classpath 'com.android.tools.build:gradle:4.2.1'
          classpath 'com.google.gms:google-services:4.3.0'}`
  dependencies{implementation 'com.google.firebase:firebase-database:18.0.1'}
  </code></pre>
  
  <p>I expected a successful sync after adding the dependencies and applying plugins but an error occured</p>