【问题标题】:Generating build from the terminal is failing, but it's working from the "Run App" option(When clicking the "Run App")从终端生成构建失败,但它可以通过“运行应用程序”选项工作(单击“运行应用程序”时)
【发布时间】:2021-07-05 11:25:48
【问题描述】:

当我尝试从终端构建项目时,它一直失败。

kaptDebugKotlin failed

我怀疑 Java JDK 路径有问题。但我在 bash 文件和 Android Studio 中都设置了 java_home。

我在 Android Studio 中将 JDK1.8 的 home 设置为 java_home 和 JDK 位置。

注意:我使用的是 Mac。

【问题讨论】:

    标签: java android android-studio kotlin terminal


    【解决方案1】:

    将此添加到 gradle.properties:

    org.gradle.java.home=<JDK location>
    

    同时检查这些命令的确切问题:

    --stacktrace --info --scan
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-18
      • 2018-10-19
      • 1970-01-01
      • 1970-01-01
      • 2021-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多