“Unsupported major.minor version 52.0” error when gradle build

when I tried to build a specific module only by using /gradlew command, it gave me the error

> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

It usually worked but suddenly it didn’t. I noticed that I have changed the default java, javac to jdk7 from jdk8. I reset both tool to jdk8 with update-alternatives and it now works fine.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s