Getting "Gradle sync failed: Use JDK 8 or newer" in 3.3

I checked every thread associated with this error. But I didn't find a suitable answer. I have an additional error as well. Check screenshots.

Screenshot 1

Screenshot 2

+3


source to share


2 answers


Posts I came across recommending fixing problems with JDK paths via "Switch IDE book JDK ..." or "Project Structure".

For me, in Android Studio 3.0, "Project Structure" will no longer open, so I upgraded to 3.1. Subsequently it still had the JDK version error, but now it allowed me to open Project Structure from the File menu where I was able to fix the locations and versions of the JDK, SDK, and NDK.

There were a few more build errors after that, but clicking the recommended fix in the build output window ended up installing everything I needed. Once it managed to sync correctly, it also updated Gradle to 4.4. Then new build tools were required, etc.



While the instructions directly may not help everyone, it indicates configuration corruption. So if you can't just update to get around this, I recommend backing up your Android Studio settings (usually in the user's home directory, for example ~/.AndroidStudioX.Y

) as well as your project .idea

(usually at the root of your project), and then deleting the originals ... If that's not enough yet, clear the configurations again and reinstall Android Studio.

Note. I was going back to an old project, so I had to accept a few deprecated feature warnings that were removed in 2018.

+1


source


Someone wrote a blog about this. Before deleting anything, check https://www.thehackeruniversity.com/2018/01/20/fix-gradle-sync-failed-error-android-studio/



0


source







All Articles