Youssef El Garny
Youssef El Garny

Reputation: 65

Gradle project sync failed on Android Studio 3.0.1

I am installing Android Studio 3.0.1 for the first time on my laptop, and I couldn't create my first Hello World app.

I get the following error:

Create process failed, error=216
Error:
Consult your IDE log for more details

The error can be seen on this screenshot.

Upvotes: 4

Views: 34362

Answers (5)

Gourav Samre
Gourav Samre

Reputation: 132

1st Solution : -

  • Goto File -> Invalidate caches / Restart

2nd Solution : -

  1. Shutdown Android Studio
  2. Rename .gradle folder in the user home directory
  3. Restart Android Studio 4.Rebuild/Clean project.
  4. Done

Upvotes: 1

TheHourGlass
TheHourGlass

Reputation: 1

First on the yellow error banner click open 'messages' view see pic1 then in the new view that opened up click install ___________ see pic2 & pic3 then click try again if you get the same error in the messages view then you will have to install it manually- If one or both of these do not install, put the downloading ______________ (see pic4) into chrome and it will download it, now extract the file and put it in the right place.

The build tools place is

C:\Users\<name of active user>\AppData\Local\Android\Sdk\build-tools\26.0.2

The ndk package place is:

C:\Users\<name of active user>\AppData\Local\Android\Sdk\ndk-bundle

Delete all the files in the folder and paste the new files from the folder you just downloaded and extracted. The files you download and the ones you paste in should look similar but not exactly the same. Once you do this the problem should be solved and you can press "try again"

pic1 pic1 pic2 pic2 pic3 pic3 pic4 pic4

Upvotes: 0

ViktorMS
ViktorMS

Reputation: 1351

This worked for me, using the solution Android Studio provides, just click on the link in the bottom left corner:

  1. Click the error message at top "Gradle project sync failed" where the text says ´Open message view´
  2. In the "Message Gradle Sync" window on the bottom left corner, click the provided solution "Install missing ... "
  3. Repeat 1 and 2 if necessary

Android Studio providing a solution

Upvotes: 0

Levon Petrosyan
Levon Petrosyan

Reputation: 9655

Go to File -> Project Structure,uncheck "Use embedded JDK" and select the 32-bit JDK.

Upvotes: 2

Khemraj Sharma
Khemraj Sharma

Reputation: 59004

I had the same issue, but I have resolved it the next:

1) Install jdk1.8...

2) In AndroidStudio File->Project Structure->SDK Location, select your directory where the JDK is located, by default Studio uses embedded JDK but for some reason it produces error=216.

3) Click Ok.

Upvotes: 1

Related Questions