ionic無法下載'https://jcenter.bintray.com/com/android/tools/build/gradle/x.x.x/gradle-x.x.x.pom
作為中國開發者,你必須要知道有一堵牆,名為GFW。在這時,有時你需要載入網路資源的程式就會莫名奇妙被阻斷,這不一定是程式bug,而有可能時網路問題。比如當ionice需要載入資源時無奈正好被肛上了:
What went wrong:
A problem occurred configuring root project ‘helloworld’.
Could not resolve all dependencies for configuration ‘:classpath’.
Could not resolve com.android.tools.build:gradle:1.3.1.
Could not resolve com.android.tools.build:gradle:1.3.1.
Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom‘.
Could not HEAD ‘https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom‘.
peer not authenticated
這是在我們需要訪問jcenter中心載入資源時常見的問題,解決方法如下(此法通用):
將build.grade檔案裡的jcenter() 用 替換即可