java Lang UnsupportedClassVersion Error in Xamarin Studio

后端 未结 11 1925
终归单人心
终归单人心 2020-11-27 02:39

I am getting the following error when I am building my project . How do I correct this ?

C:\\Program Files (x86)\\MSBuild\\Xamarin\\Android\\Xamarin.Android.Common.t

11条回答
  •  忘掉有多难
    2020-11-27 03:31

    The version 52.0 here is referring to the specific release of the JDK, which in this case relates to JDK 8.

    Xamarin.Android 7.0 requires JDK 1.8 to use the Android Nougat (API 24) APIs. You can continue to use earlier versions of the JDK if targeting earlier Android API levels:

    • JDK 1.8 - up to API 24+

    • JDK 1.7 - up to API 23

    • JDK 1.6 - up to API 20

    Additionally, a 64-bit version of the JDK is required to use custom controls in the Android designer.

    The simplest option is to install the 64-bit version of JDK 1.8 since it is backwards compatible with all of the previous API levels and supports the new Android designer features.

    (One unfortunate complication with JDK 1.8 is that is not compatible with the outdated version of Proguard that is included in the Android SDK. Currently this will cause an error "Unsupported class version number [52.0]" when attempting to use the Proguard or Multidex features in Xamarin.Android. See 44187. I would recommend that you install this on the side of the default version that Android ships in android-sdk\tools\proguard. Simply rename the existing folder to something else and add the new version of proguard.)

提交回复
热议问题