1

I am following udacity's android course which ask to download their sunshine project. When I checked it out and imported it into android studio, am not able to open xml files. The console says Failed to syncGradle project. I have attached a screenshot below.

Any idea how I can fix this and why is it so important that I can't even open the xml files?

enter image description here

Vivin
  • 1,327
  • 2
  • 9
  • 28
  • Have you followed the error message's advice? What happens when you view the SDK manager? Do you have the appropriate version installed that the project is looking for? – CzarMatt Jun 02 '16 at 21:38
  • When I click on Build Project nothing happens. When I click on Open Android SDK Manager I dont anything that indicates something is missing – Vivin Jun 02 '16 at 21:46
  • Can you verify that the `buildToolsVersion` specified in the project's Gradle file is the build tools version you have installed ? – CzarMatt Jun 02 '16 at 21:48
  • Can you point me where can I find these 2 things – Vivin Jun 02 '16 at 21:58
  • The file `build.Gradle` is located in the root of your project - you can find it by looking in the Project view of Android Studio. Look in that file for `buildToolsVersion` and make sure you have that same version installed by opening your Android SDK manager. – CzarMatt Jun 02 '16 at 22:04
  • @CzarMatt There was no mention of buildToolsVersion in the build.Gradle file. Also how do I check the version from Android SDK Manager? – Vivin Jun 06 '16 at 18:26

1 Answers1

1

I ran into this same problem. Here's how I fixed it:

  1. First: go to the following stackoverflow link and use piotrek1543's answer.

    Gradle version 2.2 is required. Current version is 2.10

  2. Then the project will tell you your SDK is out of date. Click the update/sync SDK ribbon. The SDK will install.

  3. Then, it'll say tools out of date. Click the sync tools ribbon. The tools will install.

It should work after that.

Community
  • 1
  • 1
Aeroradish
  • 371
  • 1
  • 5
  • 11