Recently when trying to run an Android project in Android studio, I noticed the following error on opening it:
Unsupported major.minor version 52.0
After doing some Google search I found that the problem was due to the code requiring Java 8 while my IDE used Java 7. So, to fix it one has to
– Go to File > Other Settings > Default Project Structure…
– If your JDK location is set to a Java 1.7 location, change it to the corresponding Java 1.8 location. In my case the required path was
– Click OK
That’s it. Now the error should go away.