'Error:Unknown host 'maven.fabric.io'. You may need to adjust the proxy settings in Gradle
I am trying to use the fabric io plugin and have to use the below maven repo :
maven { url 'https://maven.fabric.io/public' }
but it gives me error while syncing : Error:Unknown host 'maven.fabric.io'. You may need to adjust the proxy settings in Gradle
I have checked my proxy connection by putting below URL in the Check connection > Check Proxy Connection Box
http://maven.fabric.io
and
http://maven.fabric.io
What else am I missing here?
Solution 1:[1]
I noticed that maven.fabric.io
is included in some adblockers lists.
If you have an AdBlocker directly on your modem you might want to add this domain to your whitelist. It solved the issue for me.
Solution 2:[2]
"invalidate Caches/restart" works for me.
Solution 3:[3]
Make sure your app level build.gradle has these lines.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.22.1'
}
}
apply plugin: 'com.android.application'
...
apply plugin: 'io.fabric'
And project leve build.gradle must have these line
repositories {
jcenter()
mavenCentral()
maven { url 'http://repo.maven.apache.org/maven2' }
}
Solution 4:[4]
invalidate Caches/restart
did not work for me and I already had fabric maven and plugin in my build.gradle
. I had to connect to a different proxy for this to work. Probably it was being blocked as @jjacobi pointed out.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | jjacobi |
Solution 2 | Liang |
Solution 3 | Ankit Kumar |
Solution 4 | navid |