虚幻5.3-安卓打包问题-虚幻引擎相关论坛-问题反馈-虚幻社区

虚幻5.3-安卓打包问题

20240129123943198-PixPin_2024-01-29_12-38-20

错误码

ATHelper: 打包 (Android (ASTC)): > Could not resolve all files for configuration ':classpath'.
UATHelper: 打包 (Android (ASTC)):    > Could not resolve com.android.tools.build:gradle:7.4.2.
UATHelper: 打包 (Android (ASTC)):      Required by:
UATHelper: 打包 (Android (ASTC)):          project :
UATHelper: 打包 (Android (ASTC)):       > No matching variant of com.android.tools.build:gradle:7.4.2 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but:
UATHelper: 打包 (Android (ASTC)):           - Variant 'apiElements' capability com.android.tools.build:gradle:7.4.2 declares a library, packaged as a jar, and its dependencies declared externally:
UATHelper: 打包 (Android (ASTC)):               - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
UATHelper: 打包 (Android (ASTC)):               - Other compatible attribute:

乍一看没有红字错误提示,找了许久没有找出问题在哪。。发现上方提示gradle7.4编译器not found,我下载的是7.5版本,不适配java8,于是下载java17即可修复此错误

以下附上java8/11/17的版本安装文件:

经查询官网5.3文档,配合SDK33,JDK17,NDK25,可打包成功。

  • NDK版本:r25b

  • 编译工具:33.0.1

  • Java运行时:OpenJDK 17.0.6 2023-01-17

各版本安卓打包要求:

UE版本

Android Studio版本

最低Android SDK版本

Android NDK版本

备注

5.3

Flamingo 2022.2.1 Patch 2 2023年5月24日

SDK 33

NDK r25b

 

5.1-5.2

Android Studio 4.0

推荐版本:SDK 32 最低版本:SDK 30

NDK r25b

虽然在系统中编译最低需要SDK 30,但是对于要发布项目的目标设备最低可以使用SDK 26。

5.0

Android Studio 4.0

SDK 23

NDK r21e

使用Android文件服务器(AFS)所需的最低SDK版本是26。

请登录后发表评论

    没有回复内容