Unknown host ‘dl.google.com’ in android

  • Post comments:0 Comments

Unknown host ‘dl.google.com’. You may need to adjust the proxy settings in Gradle.

There are many reasons to this problem, but some methods do not work and some method works. So here try to solve using any method.

When your android studio fetches this type of error, first check proxy settings.

Why does Unknown host ‘dl.google.com problem happen?

There are many reasons for this problem.

  • You downloaded a new android studio.
  • You added a new dependency.
  • Likewise, you are trying to run a download project.
  • Your Gradle file does not properly build with Gradle.
  • Your android studio is unable to download the required file from the internet.
  • You are offline, your android studio is unable to download the required file.

How to check proxy settings in Android Studio?

Most of the problems happen because of this. You can solve it by proxy setting.

Before proxy setting, you need a network connection, so the android studio can download the required file.

Then, proxy setting.

Go to File ⇾ settings ⇾ Appearance & Behavior ⇾ System Settings ⇾ HTTP Proxy ⇾ Auto detect proxy settings.

Set "Auto detect proxy settings" in android studio

After doing auto-detect proxy settings, rebuild the project.

This method absolutely works.

If this method does not work otherwise try another method.

It is possible that the method does not work due to another reason.

Let’s see another method to resolve this problem.

Method 2:

The “auto-detect proxy settings” method does not work, then this method shall be work.

Go to file ⇾ invalidate caches/restart… ⇾ invalidate and restart.

Generally, all problems are solved by this method. Still, the same problem occurs in your android studio, then try another method.

Method 3:

Sync project with Gradle files. Make sure you are connected to the internet.

Maybe It takes more time for building Gradle or downloaded require files from the internet.

After some time, your project successfully builds without any issue.

How was this problem solved?

Sometimes android studio asks for some files from the internet, but our computer is not connected to the internet, so android studio becomes unable to download the required files. So this method works to resolve “Unknown host ‘dl.google.com’.”

  All the above methods do not work, then restart the new project.

Watch on YouTube

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments