i have tried it many times but its giving me same error.how to set the proxy so that this error is solved
Update your project level build.gradle to latest version - it works for me
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
I had the same problem. What worked for me was:
Go to File>Invalidate caches/restart>Invalidate and restart.
Hope it works for you too.
If that doesn't work, give your system access to internet and click on Help>Check for Updates. And update android studio to latest versions. All gradle along with plugins will be updated and i guess it should resolve the issue.
Check your internet connection is stable or not. May be this will work with you
Go To: File --> Setting --> Build, Execution, Deployment --> Gradle, then tick the use local Gradle distribution, then set Gradle home by giving path to Gradle. Tick offline work.
Like so:
Go to..
File > Settings > Appearance & Behavior > System Settings > HTTP Proxy Enable following option Auto-detect proxy settings
and press checkConnection button for test
make sure that you disable the proxy setting. settting > apperance and behaviour > Http Proxy > and select no proxy check box and check the connection after you select no proxy or auto detect proxy setting > the apply ok