Unsupported major.minor version 52.0 in my app

后端 未结 28 2658
心在旅途
心在旅途 2020-11-28 03:43

I\'m trying to compile my Android project and I\'m getting this error

[INFO] Exception in thread \"main\" java.lang.UnsupportedClassVersionError: com/android         


        
28条回答
  •  死守一世寂寞
    2020-11-28 03:59

    52 is the code for JDK 8. You can see that here: http://javarevisited.blogspot.com/2015/05/fixing-unsupported-majorminor-version.html. So Gradle is expecting you to have JDK 8 as the default Java version on your machine. Newest versions of Gradle for Android won't work with Java 7.

    The solution is simple: make Java 8 the default jdk version on your machine.

提交回复
热议问题