NativeScript / NativeScript/android

Build error in production build with signing

未关闭
#1,531 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C++
星标
563
派生
144
平均合并
10 小时 46 分钟
30 天内合并 PR
14

描述

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.1.0
  • Cross-platform modules: 6.1.2
  • Android Runtime: 6.1.2
  • Plugin(s): no plugin

Describe the bug
When I want to build my app with production build and signing process, I get the following errors:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
   > Could not find lint-gradle.jar (com.android.tools.lint:lint-gradle:26.5.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.5.0/lint-gradle-26.5.0.jar
   > Could not find lint.jar (com.android.tools.lint:lint:26.5.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/26.5.0/lint-26.5.0.jar
   > Could not find lint-checks.jar (com.android.tools.lint:lint-checks:26.5.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/26.5.0/lint-checks-26.5.0.jar
   > Could not find lint-api.jar (com.android.tools.lint:lint-api:26.5.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/26.5.0/lint-api-26.5.0.jar
   > Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.5.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.5.0/intellij-core-26.5.0.jar
   > Could not find kotlin-compiler.jar (com.android.tools.external.com-intellij:kotlin-compiler:26.5.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.5.0/kotlin-compiler-26.5.0.jar
   > Could not find uast.jar (com.android.tools.external.org-jetbrains:uast:26.5.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/26.5.0/uast-26.5.0.jar

* 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 30s
Command gradlew.bat failed with exit code 1

Note: Normal build just works fine (with tns run android command)

To Reproduce
Just build the project with the following command:

tns build android --release --key-store-path my-release-key.keystore --key-store-password YOUR_PASS --key-store-alias YOUR_NAME --key-store-alias-password YOUR_PASS --bundle --env.uglify --env.aot

Expected behavior
No error.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用报告中的 NativeScript 版本重现 release 命令,并检查 Android 构建路径中的 :app:lintVitalRelease 任务及其 lintClassPath 依赖项。将失败的生产构建与正常工作的 tns run android 构建进行比较;当签名的 release 构建在没有缺少 lint 构件错误的情况下完成时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android
领域
build-system, mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。