0

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?

Masum
  • 1,037
  • 15
  • 32
Cramery
  • 39
  • 1
  • 7

3 Answers3

2

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

Cramery
  • 39
  • 1
  • 7
0

Try to clean the project under the Build section, if cleaning the project does not help try invalidate cache and restart project under file section.

Yash Jain
  • 415
  • 2
  • 8
  • 17
  • Thanks for the quick answer, but seems like both options don't work, I still get the same error – Cramery Feb 25 '19 at 07:40
0

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.

Android Geek
  • 8,956
  • 2
  • 21
  • 35