Unsupported major.minor version 52.0 in my app

后端 未结 28 2601
心在旅途
心在旅途 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 04:13

    This problem stems from the fact that your build tool version and JDK won't work together. I was using JDK version 7 with build tool 24.0.1. Of course lowering build tool version may fix the problem but it is not a real fix, as upgrading your build tools in future will break it again.

    You should make sure build tool version and JDK work together. I upgraded my build tool to latest (24.0.1) and installed jdk8. Make sure to set your JAVA_HOME to latest and then try clean build.

提交回复
热议问题