i have tried it many times but its giving me same error.how to set the proxy so that this error is solved
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.