简体   繁体   中英

gradle sync failed after updated android studio

I know this was asked a few times already in here, but most answers are for already working projects.

I just downloaded AndroidStudio 3.3.1. Now I started a new project and I instantly get an error, gradle sync failed.

So I watched in my settings, I have checked default gradle, so I changed to local and tried all paths I could find and diffrent help pages told me to try (the default from Android Studio, the one from the new project, one from a project I downloaded) but nothing seemeed to work. Even if it found a gradle, it could not be synced.

I don't have "Offline Work" checked, like it seemes to get problems with that too.

I checked with my work-college, he has the exact same settings, for him they work, for me they don't.

Is there anything else someone know I can do to fix this?

I found the problem...

When the project gets built, it builds the gradle online/loads the gradle. As it seems, my company network has blocked this, so it can't get built.

Working over Hotspot it works perfectly fine.

Thanks for all your kind help :)

如果清理项目无助于尝试使缓存无效并使文件部分下的项目重新启动,请尝试清理“生成”部分下的项目。

Try this:

On the right side of Android Studio there is source tree of project. Select Project instead of Android from source tree options

Now delete the .idea and .gradle files/folders of project. After that rebuild your project, if rebuild the project does not working then restart the Android Studio.

I hope its work for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM