Не могу подключить firebase к android studio

Когда я пытаюсь подключить Firebase к своему проекту в Android Studio - получаю следующее: Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync.

Код build.gradle project :

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.2"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Код build.gradle app

plugins {
    id 'com.android.application'
}

android {
    compileSdkVersion 30
    buildToolsVersion '28.0.2'

    defaultConfig {
        applicationId "com.example.atry"
        minSdkVersion 25
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories {
    maven { url "https//jitpack.io"}
}

dependencies {
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

Помогите, пожалуйста, понять, в чем дело и что нужно изменить для подключения.


Ответы (0 шт):