Gradle Project Sync failed in Android Studio 2.3.1

青春壹個敷衍的年華 提交于 2019-12-02 13:59:19

From your first screenshot

Gradle is in offline mode, which means that it won't go to the network to resolve dependencies.

Go to Preferences > Gradle and uncheck "Offline work".

After that try cleaning the project and Re-running again?

Here is a working solution..

Step 1) In Android Studio go to File > Project Structure

there unticheck "Use Embedded JDK" and below choose your JDK location..

Step 2)

Go to file gradle > wrapper > gradle-wrapper-proparties change gradle version to 3.5-all

Step 3) close the project and reopen

What worked for me;

Go to Preferences > Gradle & uncheck "Offline work"

Goto File > Invalidate caches and restart.

The project would restart and can begin to install dependencies. Dont worry if it takes a time, that could be due to slow network. Just go and sip coffee while you wait ;)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!