Android 生成APK失败,错误为。/gradlew
我有一个React本机应用程序,可以在模拟器上正常工作。我正试图建立它的APK文件。我也跟着教程学习 但是,当我运行命令Android 生成APK失败,错误为。/gradlew,android,gradle,apk,gradlew,Android,Gradle,Apk,Gradlew,我有一个React本机应用程序,可以在模拟器上正常工作。我正试图建立它的APK文件。我也跟着教程学习 但是,当我运行命令/gradlew assembleerelease时,我得到以下错误: FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:lintVitalRelease'. > Could not resolve
/gradlew assembleerelease
时,我得到以下错误:
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
我四处寻找解决方案,找到了StackOverflow问题,它的答案提供了pom文件
但我不知道该把它放在哪里
如何解决此错误?当您运行assembleRelease时,build.gradle文件中的第三部分库应保存在pom文件中//出版物不知道我们的依赖项,因此我们必须手动将它们添加到pom中这是一个链接,您可以找到有关pom的更多信息以及如何将其配置到项目中。正如答案所暗示的:谢谢,@TarikChakur,它成功了。在那之后,我遇到了一个重复的资源错误,但我按照说明解决了它