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详瑞、根據(jù)上面代碼中的下載鏈接,自行下載文件
2缕碎、將boost_1_57_0.zip 放到../node_modules/react-native/ReactAndroid/build/downloads/目錄下即可fix