gradlew bundleRelease由于com.android.tools.lint而失败

时间:2019-10-30 13:33:32

标签: android react-native

我在发布应用程序时遇到问题。当我使用gradlew bundleRelease时收到此错误

Could not resolve all files for configuration ':react-native-fs:lintClassPath'.
> Could not find lint-gradle.jar (com.android.tools.lint:lint-gradle:26.1.4).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.1.4/lint-gradle-26.1.4.jar
> Could not find lint.jar (com.android.tools.lint:lint:26.1.4).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint/26.1.4/lint-26.1.4.jar
> Could not find lint-checks.jar (com.android.tools.lint:lint-checks:26.1.4).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-checks/26.1.4/lint-checks-26.1.4.jar
> Could not find lint-api.jar (com.android.tools.lint:lint-api:26.1.4).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-api/26.1.4/lint-api-26.1.4.jar
> Could not find lint-kotlin.jar (com.android.tools.lint:lint-kotlin:26.1.4).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-kotlin/26.1.4/lint-kotlin-26.1.4.jar
> Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.1.4).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/intellij-core/26.1.4/intellij-core-26.1.4.jar
> Could not find uast.jar (com.android.tools.external.org-jetbrains:uast:26.1.4).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/tools/external/org-jetbrains/uast/26.1.4/uast-26.1.4.jar
> Could not find kotlin-compiler.jar (com.android.tools.external.com-intellij:kotlin-compiler:26.1.4).
  Searched in the following locations:
      https://dl.google.com/dl/android/maven2/com/android/tools/external/com-intellij/kotlin-compiler/26.1.4/kotlin-compiler-26.1.4.jar

但是在开发模式下应用程序编译成功。 在android/build.gradle中,我在google()之前使用jcenter(),但是它没有用,我也在react-native-fs/android/build.gradle上尝试过。 我的依赖类路径是:

        classpath 'com.android.tools.build:gradle:3.1.4'
        classpath 'com.google.gms:google-services:3.2.1'

1 个答案:

答案 0 :(得分:1)

这可能是因为在调试模式下没有进行lint检查,因此您的缓存中没有lint的依赖项。 我检查了您的错误中的链接,它们对我来说很好用。 如果您在受限制的国家/地区,使用VPN可能会为您工作。