Gradle Project Sync failed in Android Studio 2.3.1

前端 未结 3 2006
北荒
北荒 2021-01-29 07:38

Upon reopening Android Studio after an improper shutdown, my gradle project sync failed and many errors like: \"Failed to resolve: junit:junit:4.12\" started showing up in the E

3条回答
  •  感动是毒
    2021-01-29 07:57

    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 ;)

提交回复
热议问题