【问题标题】:How to solve Execution failed for task ':expo-location:compileDebugJavaWithJavac'.?如何解决任务\':expo-location:compileDebugJavaWithJavac\'的执行失败。?
【发布时间】:2022-08-18 23:31:34
【问题描述】:

我正在尝试在 android expo run:android 上运行 expo 项目,但出现此错误:

* What went wrong:
Execution failed for task \':expo-location:compileDebugJavaWithJavac\'.
> Compilation failed; see the compiler error output for details.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use \'--warning-mode all\' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

jdk版本是11

我该如何解决这个错误?

    标签: android react-native expo


    【解决方案1】:

    您的 $JAVA_HOME 变量指向 JDK 吗?几天前我遇到了这个问题,在设置 $JAVA_HOME 后它得到了解决。

    【讨论】:

    • 这是我的 $JAVA_HOME :C:\Program Files\Java\jdk-11.0.16
    猜你喜欢
    • 2021-12-08
    • 2021-04-12
    • 2022-11-06
    • 2020-09-07
    • 2021-05-04
    • 1970-01-01
    • 1970-01-01
    • 2022-11-07
    • 2023-01-05
    相关资源
    最近更新 更多