[英]Gradle cannot download from remote maven repository
On few github libraries like in here: https://github.com/commonsguy/cwac-endless I found references to repository stored on amazon. 在像这里这样的几个github库上: https : //github.com/commonsguy/cwac-endless我发现了对存储在亚马逊上的存储库的引用。
repositories {
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
}
}
dependencies {
compile 'com.commonsware.cwac:endless:1.2.3'
}
Problem is, that I can't make it works in gradle to download dependency from this kind of repository. 问题是,我不能让它从这种存储库中下载依赖项。
Here is example of my build.gradle file: 这是我的build.gradle文件的示例:
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
classpath 'com.github.dcendents:android-maven-plugin:1.0'
}
}
apply plugin: 'android-library'
apply plugin: 'android-maven'
repositories {
mavenLocal()
mavenCentral()
maven {
url "http://repo.commonsware.com/"
}
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
dependencies {
compile 'com.googlecode.android-query:android-query:0.25.9'
compile 'com.commonsware.cwac:endless:1.2.3'
compile project(':FontLibrary')
}
I am using Intellij Idea 13 and the result is: 我正在使用Intellij Idea 13,结果是:
Gradle 'OSKExplorer' project refresh failed:
Could not find com.commonsware.cwac:endless:1.2.3.
Required by:
OSKExplorer:SwipeListViewComponent:unspecified > OSKExplorer:CommonLibrary:unspecified
Don't know if using the https://repo.commonsware.com.s3.amazonaws.com URL did it for you, but I'd put that maven{url} bit in like so: 不知道是否使用https://repo.commonsware.com.s3.amazonaws.com网址为您完成了此操作,但我会像这样将maven {url}放在其中:
allprojects{
repositories{
mavenCentral()
maven{ url "https://repo.commonsware.com.s3.amazonaws.com"}
}
}
gl! gl!
replace the https to http like this, http://repo.commonsware.com.s3.amazonaws.com 将https替换为http,例如http://repo.commonsware.com.s3.amazonaws.com
it's work for me. 这对我有用。
Replace 更换
repositories {
mavenCentral()
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
}
maven {
url "https://jitpack.io"
}
}
with 与
repositories {
mavenCentral()
maven {
url "http://repo.commonsware.com.s3.amazonaws.com"
}
maven {
url "http://jitpack.io"
}
}
The url is not correct. 网址不正确。 Use this one works for me 用这个对我有用
maven {url "http://s3.amazonaws.com/repo.commonsware.com" }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.