So, I'm trying to integrate firebase to the project for crashlytics to work. I have done the following configuration to the project build.gradle file. and made sure everything is updated with the latest google-service.json file. I'm not sure what's going wrong can anyone please have a look and let me know how to get this working? I have A valid Firebase App ID and verified the one from google-service.json file with the generated file from value.xml file.
buildscript {
repositories {
jcenter()
mavenCentral() {
allowInsecureProtocol = true
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The following is my app build.gradle file
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.gms.google-services'
... ...
repositories {
maven { url "https://dl.bintray.com/lukaville/maven"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.volley:volley:1.2.0'
/* implementation 'org.apache.httpcomponents:httpcore:4.4.5'
implementation('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}*/
//implementation 'org.apache.httpcomponents:httpclient-android:4.3.5'
//Retrofit
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'io.branch.sdk.android:library:5.0.7'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.code.gson:gson:2.8.7'
implementation 'com.google.android.libraries.places:places:2.4.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.nbsp:materialfilepicker:1.9.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation platform('com.google.firebase:firebase-bom:28.4.2')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
testImplementation 'junit:junit:4.13.2'
//SwipeRefreshLayout
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
//Butterknife libraries
implementation 'com.jakewharton:butterknife:10.2.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.code.gson:gson:2.8.7'
}
The error logs I can show you are as follows:
2021-10-25 16:41:09.097 29466-29502/com.mvf.myvirtualfleet.app E/FirebaseCrashlytics: Error fetching settings.
java.lang.IllegalArgumentException: Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.
at com.google.android.gms.common.internal.Preconditions.checkArgument(com.google.android.gms:play-services-basement@@17.2.1:35)
at com.google.firebase.installations.FirebaseInstallations.preConditionChecks(FirebaseInstallations.java:181)
at com.google.firebase.installations.FirebaseInstallations.getId(FirebaseInstallations.java:240)
at com.google.firebase.crashlytics.internal.common.IdManager.fetchTrueFid(IdManager.java:167)
at com.google.firebase.crashlytics.internal.common.IdManager.getCrashlyticsInstallId(IdManager.java:117)
at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.applyHeadersTo(DefaultSettingsSpiCall.java:184)
at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:108)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:199)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:192)
at com.google.android.gms.tasks.zzp.run(com.google.android.gms:play-services-tasks@@17.0.2:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:64)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
at java.lang.Thread.run(Thread.java:764)
2021-10-25 16:41:09.196 29466-29466/com.mvf.myvirtualfleet.app I/FirebaseInitProvider: FirebaseApp initialization successful
2021-10-25 16:41:09.248 29466-29503/com.mvf.myvirtualfleet.app V/FA: App measurement collection enabled
2021-10-25 16:41:09.255 29466-29503/com.mvf.myvirtualfleet.app V/FA: App measurement enabled for app package, google app id: com.mvf.myvirtualfleet.app, 74991280361
2021-10-25 16:41:09.258 29466-29503/com.mvf.myvirtualfleet.app I/FA: App measurement initialized, version: 43042
2021-10-25 16:41:09.258 29466-29503/com.mvf.myvirtualfleet.app I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2021-10-25 16:41:09.259 29466-29503/com.mvf.myvirtualfleet.app I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.mvf.myvirtualfleet.app
2021-10-25 16:41:09.259 29466-29503/com.mvf.myvirtualfleet.app D/FA: Debug-level message logging enabled
2021-10-25 16:41:09.261 29466-29466/com.mvf.myvirtualfleet.app E/irtualfleet.ap: Invalid ID 0x00000000.
2021-10-25 16:41:09.285 29466-29503/com.mvf.myvirtualfleet.app E/FA: Invalid google_app_id. Firebase Analytics disabled. See .... provided id: 74991280361
2021-10-25 16:41:09.292 29466-29503/com.mvf.myvirtualfleet.app E/FA: Uploading is not possible. App measurement disabled
2021-10-25 16:41:09.297 29466-29466/com.mvf.myvirtualfleet.app I/ActivityThread: handleStopService: token=android.os.BinderProxy@c8525a2 not found.
2021-10-25 16:41:09.305 29466-29510/com.mvf.myvirtualfleet.app W/irtualfleet.ap: Unknown chunk type '200'.