./gradlew生成APK失败

时间:2020-09-01 08:09:53

标签: android gradle apk gradlew

我有一个React Native应用,可以在模拟器上正常工作。我正在尝试建立其APK文件。我遵循了this教程。

但是,当我运行命令./gradlew assembleRelease时,出现此错误:

FAILURE: Build failed with an exception.

* What went wrong: Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all task dependencies for configuration ':app:lintClassPath'.
   > Could not resolve com.android.tools.lint:lint-gradle:26.5.3.
     Required by:
         project: app
      > Could not resolve com.android.tools.lint:lint-gradle:26.5.3.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.5.3/lint-gradle-26.5.3.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.5.3/lint-gradle-26.5.3.pom'.
               > Connect to dl.google.com:443 [dl.google.com/2404:6800:4009:80a:0:0:0:200e] failed: Network is unreachable (connect failed)

* 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.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 8s

我四处寻找解决方案,发现了this个StackOverflow问题,其答案提供了pom文件。

但是我不知道放在哪里。

如何解决此错误?

0 个答案:

没有答案