Resolving Unsupported major.minor version 52.0 issue in Android Studio

Recently I opened my Android project and it showed me an annoying error which was something like

Error:Cause: com/android/build/gradle/internal/model/DefaultAndroidProject : 
Unsupported major.minor version 52.0

I had no clue what is this and how to resolve this.

I was using Java 7 so first thing I did was to update my Java environment to 8. But even this won’t resolve the issue so googled the problem and found many solutions but all of them are way different than another.

So I have mentioned all the steps here to resolve this issue and they are as follows

1. Update your Java to Java 8.
2. Open File -> Project Structure or simply shift + Ctrl +alt + s.
3. Open project level build.gradle and change the build tools to this

classpath 'com.android.tools.build:gradle:2.1.0'

 

After this clean your project and and everything will be fine again.

Leave a comment