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

严重性 代码 说明 项目 文件 行 禁止显示状态
错误 xamarin java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
xama

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error: java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0 (FGH)

 

SDK Build Tools Version: 24 rc2

The "Build Tools Version" looks like it might be the problem. Xamarin.Android is not yet compatible with the "24 rc2" Build-tools version from the "Preview Channel" in the Android SDK Manager. You can uninstall that preview version and install one of the non-preview versions of the Build-tools (such as 23.0.3) using the Android SDK Manager.


Update June 16, 2016:

The non-preview version of Android SDK Build-tools version 24 is now available in the Android SDK Manager. Xamarin.Android is not yet compatible with that version either.


Update July 14, 2016:

Unsupported major.minor version 52.0

It turns out this error message is caused by an incompatibility with the Java JDK rather than with Xamarin.Android: Android SDK Build-tools version 24 requires Java JDK 1.8, whereas earlier versions were still compatible with Java JDK 1.7. (This resembles older answers about the same error.)


Update July 25, 2016:

Google has now released Android SDK Build-tools 24.0.1. That version fixes a bug in aapt that was present in version 24. So you can now update to Build-tools 24.0.1 if desired, but you must also update to Java JDK 8.

Steps to update:

  1. Update to Java JDK 8.

  2. Install Android SDK Build-tools 24.0.1.

  3. (Optional) Uninstall the older Android SDK Build-tools 24 that contains the aapt bug:

Alternatives:

If you would rather not update to Java JDK 8 yet, you can instead do one of the following.

  • Uninstall all Android SDK Build-tools versions 24 and higher via the Android SDK manager.

  • Or set the AndroidSdkBuildToolsVersion MSBuild property to an earlier version. For example, if you also have version 23.0.3 installed, you could add the following line within the top <PropertyGroup> element in the Android project .csproj file:

    <AndroidSdkBuildToolsVersion>23.0.3</AndroidSdkBuildToolsVersion>
    

(See also https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/.)

引用自:http://stackoverflow.com/questions/36457947/java-lang-unsupportedclassversion-error-in-xamarin-studio/36458217

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值