我在设置反应原生的Android项目时遇到了问题。我是在一个不允许存储库网站的代理后面。所以我在gradle.properties文件中配置了代理设置,如下所示。如果我没有配置以上属性gradle没有下载。
systemProp.http.proxyHost=proxy ip
systemProp.http.proxyPort=port
systemProp.http.proxyUser=my user name
systemProp.http.proxyPassword=my password
现在我收到以下错误消息:
A problem occurred configuring root project 'pmdemo'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.3.1.
Required by:
:pmdemo:unspecified
> Could not resolve com.android.tools.build:gradle:1.3.1.
> Could not get resource 'http://jcenter.bintray.com/com/android/tools/
build/gradle/1.3.1/gradle-1.3.1.pom'.
> Could not GET 'http://jcenter.bintray.com/com/android/tools/build/
gradle/1.3.1/gradle-1.3.1.pom'. Received status code 403 from server:
Forbidden
任何人都可以帮助我解决这个问题。 在此先感谢
答案 0 :(得分:0)
我已解决此问题。只需更改build.gradle文件上的协议
buildscript {
repositories {
...
jcenter()
maven { url "https://jcenter.bintray.com"} // http -> https
}
dependencies {
...
}
}
allprojects {
repositories {
...
maven { url "https://jcenter.bintray.com"} // http -> https
}
}