android打包包错求救

来源:14-6 打包发布React Native项目【收获果实】

上节课讲的啥来着

2019-09-24

相关版本:

"dependencies": {
    "@react-native-community/async-storage": "^1.6.1",
    "GitHubTrending": "^3.1.1",
    "react": "16.8.6",
    "react-native": "0.60.5",

执行./gradlew assembleRelease打包时报错求解:
Could not determine the dependencies of task ‘:@react-native-community_async-storage:extractReleaseAnnotations’.


FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':@react-native-community_async-storage:extractReleaseAnnotations'.
> Could not resolve all task dependencies for configuration ':@react-native-community_async-storage:lintClassPath'.
   > Could not resolve com.android.tools.lint:lint-gradle:26.4.1.
     Required by:
         project :@react-native-community_async-storage
      > Could not resolve com.android.tools.lint:lint-gradle:26.4.1.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve com.android.tools.lint:lint-gradle:26.4.1.
         > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
            > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve com.android.tools.lint:lint-gradle:26.4.1.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.4.1/lint-gradle-26.4.1.pom'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
               * 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 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 10s
写回答

1回答

CrazyCodeBoy

2019-09-24

网络问题导致依赖包没有下载下来,多重试几次

0
0

RN入门到进阶,打造高质量上线App

解锁React Native开发应用新姿势,React Native新版本热门技术

3196 学习 · 3259 问题

查看课程