關(guān)于學(xué)習(xí)過程中打包android apk時(shí)的報(bào)錯(cuò)
在項(xiàng)目中新增了第三方原生組件react-native-image-crop-picker時(shí)胸哥,本地調(diào)試正常残黑,打包測試時(shí)報(bào)錯(cuò)!
// 報(bào)錯(cuò)信息如下
Could not resolve all files for configuration ':jcore-react-native:lintClassPath'.
> Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)
> Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Could not GET 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Remote host closed connection during handshake
> Could not download trove4j.jar (org.jetbrains.trove4j:trove4j:20160824)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'.
> Connection reset
各種查閱后,得到結(jié)果如下:猜測應(yīng)該是網(wǎng)絡(luò)問題叹哭,翻墻谷羞?導(dǎo)致無法獲取jar包
//在android build.gradle中將
google()
jcenter()
//替換為
maven { url 'https://maven.aliyun.com/repository/google'}
maven { url 'https://maven.aliyun.com/repository/jcenter'}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public'}