Unsupported major.minor version 52.0 in my app

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

    I installed Android Studio alongside to Xamarin Visual Studio (was already installed). After the installation (excluded SDK, because they were already installed) I started Android Studio and it downloaded, installed and added missing SDKs (after giving the path to the SDK location). As a result I got the error message on build

    java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0

    As a solution I installed jdk-8u101-windows-i586.exe without JRE (because it was already installed). Before I tried the x64 version, but it disappeared ... Then you have to change the Java Development Kit location.

    This is done in Visual Studio by clicking Tools > Options > Xamarin > Android Settings. Here you can navigate to the correct location. In my case it was C:\Program Files (x86)\Java\jdk1.8.0_101.

    Finally, clean your project and make a new build :-)

提交回复
热议问题