美文网首页
react native android源码编译ssl报错

react native android源码编译ssl报错

作者: eyow | 来源:发表于2018-05-10 10:03 被阅读68次

    Error:Execution failed for task ':ReactAndroid:downloadBoost'.

    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    在ReactAndroid工程中找到build.gradle

    找到下面的代码

      task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {  // Use ZIP version as 
      it's faster this way to selectively extract some parts of the archive  src 
      '[https://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.zip]
      (https://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.zip)'  // alternative // src 
      '[http://mirror.nienbo.com/boost/boost_1_57_0.zip](http://mirror.nienbo.com/boost/boost_1_57_0.zip)'  
      onlyIfNewer true  overwrite false  dest new File(downloadsDir, 'boost_1_57_0.zip') }
    

    由于下载boost_1_57_0.zip问题导致的上面的错误

    解决办法:

    1、根据上面代码中的下载链接,自行下载文件

    2、将boost_1_57_0.zip 放到../node_modules/react-native/ReactAndroid/build/downloads/目录下即可fix

    相关文章

      网友评论

          本文标题:react native android源码编译ssl报错

          本文链接:https://www.haomeiwen.com/subject/xrxzrftx.html