When trying to create a release signed apk, Build fails at task
app:uploadCrashlyticsMappingFileRelease'.Host name must not be empty.
I have enabled obfuscation .
buildTypes {
release {
minifyEnabled true // Enables code shrinking, obfuscation, and optimization
shrinkResources true // Enables resource shrinking, which is performed by the Android Gradle plugin
firebaseCrashlytics {
mappingFileUploadEnabled true
}
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Also,using
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
// Apply the Crashlytics Gradle plugin
apply plugin: 'com.google.firebase.crashlytics'
implementation 'com.google.firebase:firebase-auth:20.0.1'
implementation 'com.google.firebase:firebase-firestore:22.0.1'
implementation 'com.google.firebase:firebase-core:18.0.0'
//the Firebase SDK for Google Analytics.
implementation 'com.google.firebase:firebase-analytics:18.0.0'
//the Firebase Crashlytics SDK.
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
and,
classpath 'com.google.gms:google-services:4.3.4' // Google Services plugin
// Add the Crashlytics Gradle plugin.
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
Anyone facing the same issue? I tried clearing gradle cache and removing crashlytics dependencies as i read that it will be automatically handled by Android Studio,but crashes are not recorded then.
Iam using Android Studio 4.1.1(upgraded from previous version)
Build #AI-201.8743.12.41.6953283, built on November 5, 2020 Runtime version: 1.8.0_242-release-1644-b3-6222593 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 5.4.0-58-generic GC: ParNew, ConcurrentMarkSweep Memory: 1246M Cores: 4 Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true Non-Bundled Plugins: com.android.tool.sizereduction.plugin Current Desktop: ubuntu:GNOME.