我在我的系统中安装了Android Studio版本2.1.2,如果我在Gradle文件中添加任何依赖项,则会出现“无法解决错误”的错误。
It happen the all the libraries likes Picasso not only for Junit
所以我尝试在 gradle.properties
文件中添加代理设置
systemProp.http.proxyHost=http://xxxx/xxx
systemProp.http.proxyPort=80
systemProp.https.proxyHost=http://xxxx/xxx
systemProp.https.proxyPort=80
但是我遇到了以下错误:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not resolve junit:junit:4.12.
Required by:
MyApplication2:app:unspecified
> Could not resolve junit:junit:4.12.
> Could not get resource 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom'.
> Could not GET 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom'.
> http://xxxx/xxx
请帮助解决此问题。
build.gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.example.muraliathmarao.myapplication"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}
curl --head https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom
- nshmuratask clean(type: Delete) { delete rootProject.buildDir }
- IntelliJ Amiya