zoukankan      html  css  js  c++  java
  • React Native 打包异常:Connect to maven.google.com failed: connect timed out(原创)

    异常原文:

    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Could not determine the dependencies of task ':react-native-fast-image:generateReleaseRFile'.
    > Could not resolve all task dependencies for configuration ':react-native-fast-image:releaseRuntimeClasspath'.
       > Could not resolve com.facebook.react:react-native:+.
         Required by:
             project :react-native-fast-image
          > Failed to list versions for com.facebook.react:react-native.
             > Unable to load Maven meta-data from https://maven.google.com/com/facebook/react/react-native/maven-metadata.xml.
                > Could not get resource 'https://maven.google.com/com/facebook/react/react-native/maven-metadata.xml'.
                   > Could not GET 'https://maven.google.com/com/facebook/react/react-native/maven-metadata.xml'.
                      > Connect to maven.google.com:443 [maven.google.com/216.58.200.238] failed: connect timed out
    
    * 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.5/userguide/command_line_interface.html#sec:command_line_warnings
    
    BUILD FAILED in 17m 47s

    解决方案:

    找这个插件的位置(../node_modules/react-native-fast-image),修改./android/build.gradle的maven地址:

    repositories {
        mavenCentral()
        google()
        maven {
            url "http://maven.aliyun.com/nexus/content/groups/public/" # 原先是:maven.google.com
        }
    }

    gradle clean后重新打包即可。

  • 相关阅读:
    经典SQL语句大全
    C# 在子线程中创建不会阻塞执行窗体
    win7 C# winForm编程 savefiledialog 不能弹出保存窗体
    什么是AJAX技术及其常识
    C++安装失败解决办法
    java实现图像的直方图均衡以及灰度线性变化,灰度拉伸
    java关于邮件发送
    我都博客第一天
    开博随笔
    git使用
  • 原文地址:https://www.cnblogs.com/Denny_Yang/p/14215177.html
Copyright © 2011-2022 走看看