Host name may not be empty

Check your Gradle scripts root. If there is this file: gradle.properties (Global Properties), check that values are correct.

In my case, I removed all these properties and my problem solved

systemProp.http.proxyHost=
systemProp.http.proxyPort=80
systemProp.https.proxyHost=
systemProp.https.proxyPort=80

It may be problem with uploadMappingFile

Set the firebaseCrashlytics.enableMappingFileUpload Gradle extension property to true in your app-level build.gradle file.

// To enable Crashlytics mapping file upload for specific product flavors:
  flavorDimensions "environment"
  productFlavors {
    staging {
      dimension "environment"
      ...
      firebaseCrashlytics {
        mappingFileUploadEnabled false
      }
    }
    prod {
      dimension "environment"
      ...
      firebaseCrashlytics {
        mappingFileUploadEnabled true
      }
    }
  }

for more details visit here