该项目工作正常,但当我通过添加这两个中的任何一个尝试使用涟漪效应库时 -
compile 'com.github.traex.rippleeffect:library:1.3'
compile 'com.balysv:material-ripple:1.0.2'
Gradle构建过程似乎陷入解决依赖关系:app debug compile并取消它,我得到了这个日志错误
Error:Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.14.1-all.zip'.
我的build.gradle(模块应用)是 -
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.priyanshu.iitmandi"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
// compile 'com.balysv:material-ripple:1.0.2'
compile 'com.github.traex.rippleeffect:library:1.3'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
}
同时构建gradle项目是 -
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
jcenter { url "http://jcenter.bintray.com/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
dependencies {
}
在控制台中获取此内容 -
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not resolve com.github.traex.rippleeffect:library:1.3.
Required by:
IITMandi:app:unspecified
> Could not resolve com.github.traex.rippleeffect:library:1.3.
> Could not get resource 'https://jcenter.bintray.com/com/github/traex/rippleeffect/library/1.3/library-1.3.pom'.
> Could not GET 'https://jcenter.bintray.com/com/github/traex/rippleeffect/library/1.3/library-1.3.pom'.
> Connect to 10.8.0.1:8080 [/10.8.0.1] failed: Connection timed out
> Could not resolve com.github.traex.rippleeffect:library:1.3.
> Could not get resource 'https://jitpack.io/com/github/traex/rippleeffect/library/1.3/library-1.3.pom'.
> Could not GET 'https://jitpack.io/com/github/traex/rippleeffect/library/1.3/library-1.3.pom'.
> Connect to 10.8.0.1:8080 [/10.8.0.1] failed: Connection timed out
我从设置中移除了代理但仍然在这里代理导致此错误,如何更正此
[已解决]从gradle.properties中删除代理时问题已解决
答案 0 :(得分:0)
在build.gradle(项目级别)中尝试更改以下内容
repositories {
maven { url 'http://repo1.maven.org/maven2' }
jcenter { url "http://jcenter.bintray.com/" }
maven{ url "https://github.com/omadahealth/omada-nexus/raw/master/release" }
}
您可以在here
找到更多信息