Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Host name may not be empty

After upgrading my Android Studio, I got this error whenever I wanted to generate a signed Apk (without any detail of where the problem is). There was no problem when I just built Apk.

The Host name may not be empty
like image 669
mona baharlou Avatar asked Jun 01 '20 08:06

mona baharlou


3 Answers

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
like image 185
mona baharlou Avatar answered Oct 31 '22 22:10

mona baharlou


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

like image 32
Mansukh Ahir Avatar answered Oct 31 '22 23:10

Mansukh Ahir


Yep, problem started at AS 4.0 up.. Here are the clearer fixes... (Cos Some may think the "gradle.properties" file being talked about here is what is in the AS project instead of the global one.

Delete the following lines from the "gradle.propeties" file on your PC gradle installation location

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

as seen in n my picture below here is a typical file location of this gradle.propeties file enter image description here

enter image description here

Now click rebuild in your project and VIOLA... Problem solved

like image 26
Samuel Ewudzi Incoom Avatar answered Oct 31 '22 21:10

Samuel Ewudzi Incoom