Error:Unknown host \'This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server\'.
Ok, I don't know how I got this error, I completed my project and when I came back from a short break, I saw this error and I don't know how did I run into it.
But after searching an answer over stack overflow, I didn't get one
So just tried to launch another already completed project and it was also giving the same error
Then I just switch my internet connection from my wifi router to my mobile hotspot and try again and it worked
If you didn't find any answer yet just give this one a try, might this one solve your problem
Go to File > Project Structure and then:
jcenter
to jcenter()
in the Android plugin Repository and Default Library RepositoryUpdate latest version of dependencies work for me in project level build.gradle!!!
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha05'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.0.1'
}
First, I shut down my proxy, but it doesn't work.
Then I just try again and again, and add the code below in build.gradle
repositories {
google()
jcenter()
mavenCentral()
}
This is how i fixed it.
I got the same error and solved the problem using following instruction.
Go to your project level gradle build script add maven { url"https://jitpack.io"} into allprojects.
allprojects {
repositories {
google()
jcenter()
maven {url"https://jitpack.io"}
}
}