Unity2017.4.40c1版本安卓平台使用签名打包APK出现错误:
CommandInvokationFailure: Failed to sign APK package.
D:\XXX\XXX\XXX\AndroidSDK\android-sdk_r24.4.1-windows\android-sdk-windows\build-tools\30.0.0-rc1\apksigner.bat sign --ks
java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
开始看提示一直以为是jdk的问题,卸载重装了,也用了java unstall 防止卸载不干净.后来在网上找才发现是 安卓SDK build tool的问题.
刚开始是30.0.1版本,换成了28.0.3版本就好了.
下面是切换安装版本的地方[点下右下角的勾,就能*选择版本了]
勾选右下角,就能*选择版本了