You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Expo Android构建卡滞:JDK版本不兼容问题求助

Expo Android构建失败问题及本地复现疑问

近期使用Expo执行Android构建时失败,报错信息如下:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':expo-permissions:compileReleaseJavaWithJavac'.
> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5m 41s

已查阅两篇StackOverflow相关帖子,但多数解决方案均无效,推测可能是Expo与其子模块存在版本不匹配问题,但尚未确认。

执行expo eject后,发现build.gradle中编译选项设置为Java 1.8版本:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

已在Expo文档中找到设置构建工具版本的配置方法,但希望了解无需上传至Expo即可复现该问题的方法。曾尝试运行./android/gradlew installRelease,但不确定该操作是否与Expo.dev上的构建流程一致。

内容的提问来源于stack exchange,提问作者Mauro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 12:45:43