How to solve Unknown host 'cm.crashlytics.com' Issue showing up in Gradle while building the APK?

Viewed 1540

I was trying to build a release variant of my App. While building the apk Gradle is showing this error Unknown host 'cm.crashlytics.com'. You may need to adjust the proxy settings in Gradle.

I am using Gradle version 5.4.1 and plugin 3.5.3

Gradle dependency for crashlytics: com.google.firebase:firebase-crashlytics:17.0.0-beta01 I know this is now deprecated. But I tried with the latest. Still no luck. Also, I tested the auto-detection proxy settings and almost everything I could find from similar queries in the stack overflow.

Gradle shows this issue only on the creation of a release build.
How can I solve it?

1 Answers

Upgrade your crashlytics dependencies to latest version as firebase is now suggesting to upgrade your dependencies to 17.0.0+. The following are my dependencies and apk got build

in build.gradle (android/build.gradle)

  • Project-level changes
     classpath 'com.android.tools.build:gradle:3.6.4'
     classpath 'com.google.gms:google-services:4.3.4'
     classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'

in build.gradle (android/app/build.gradle)

  • App-level changes
    implementation 'com.google.firebase:firebase-crashlytics:17.2.2' 
Related