I'm writing a proof of concept application to demonstrate adding Firestore and Crashlytics to a Java Android Application.
I first wrote a simple Firestore project and that went smoothly. I then tried to add Crashlytics. There is a step where you "Enable Crashlytics", when I click on that, I get a spinner that spins endlessly.
I thought perhaps the issue was that Crashlytics needs to be added when you first setup the project so I created a new Google Cloud project, set it up for Firestore, then tried to add Crashlytics but got the same issue, the Enable Crashlytics spins forever.
Someone posted this issue in a Google Firestore group, exact same issue, but there are no responses.
In the Google documentation the Enable Crashlytics step is before updating the gradle files suggesting that Enabling Crashlytics to the Google side Firestore project is not dependent on the gradle files.
Thank you,
Warren
Here is my project level gradle file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.0"
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.6.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
here is my app level gradle
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.google.firebase.crashlytics'
}
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.warrendixon.crashlytics"
minSdkVersion 23
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
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-firestore:21.4.0'
implementation platform('com.google.firebase:firebase-bom:28.0.1')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
apply plugin: 'com.google.gms.google-services'
I see that in your app/build.gradle
file you have two times apply plugin: 'com.google.gms.google-services'
but no apply plugin: 'com.google.firebase.crashlytics'
, so I suggest removing one and adding the crashlytics one, as stated on the oficial documentation .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.