I am trying to learn how to create an Android application with Android Studio. My project is currently blank, the only page is MainActivity.java. I created a project in Firebase and put the name (com.example.connect), and I added the JSON file to the App location, but when I click connect, I get the following error:
(Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync)
How can I fix it?
Build Gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "RUVOLT"
include ':app'
Build Gradle Module
plugins {
id 'com.android.application'
id 'com.google.firebase.crashlytics'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.ruvolt"
minSdk 19
targetSdk 32
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
}
}
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation 'com.google.firebase:firebase-analytics:20.0.2'
implementation platform('com.google.firebase:firebase-bom:29.0.3')
implementation 'com.google.firebase:firebase-analytics'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}