Unsupported major.minor version 52.0 in my app

后端 未结 28 2672
心在旅途
心在旅途 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:17

    I face this problem too when making new project from android studio.

    I've been able to resolve this by downgrading buildToolsVersion in app gradle setting: change {module-name}/build.gradle line

    buildToolsVersion "24.0.0 rc1"

    to

    buildToolsVersion "23.0.3"


    @Edit:
    In Android Studio 2.1 Go to File-> Project Structure->App -> Build Tool Version. Change it to 23.0.3

    Do the method above, only when you are using java version 7 and for some reason do not want to upgrade to java 8 yet.

    Hope this helps

提交回复
热议问题