摇篮不能从远程Maven仓库下载 [英] Gradle cannot download from remote maven repository
问题描述
在像这里几GitHub的库: https://github.com/commonsguy/cwac-endless ,我发现引用存储库存储在Amazon的。
{库
行家{
网址https://repo.commonsware.com.s3.amazonaws.com
}
}依赖{
编译com.commonsware.cwac:不已:1.2.3
}
问题是,我不能让它工作在gradle这个从这种资源库中下载的依赖。
下面是比如我的build.gradle文件:
buildscript {
库{
mavenLocal()
mavenCentral()
}
依赖{
类路径'com.android.tools.build:gradle:0.7.+
类路径'com.github.dcendents:Android的Maven的插件:1.0
}
}
应用插件:Android的图书馆
应用插件:Android的行家库{
mavenLocal()
mavenCentral()
行家{
网址http://repo.commonsware.com/
}
}安卓{
compileSdkVersion 19
buildToolsVersion19.0.2 defaultConfig {
14的minSdkVersion
targetSdkVersion 19
版本code 1
的versionName1.0
}
发布 {
runProguard假
proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard的-rules.txt
}
}
依赖{
编译com.google code.android查询:Android的查询:0.25.9
编译com.commonsware.cwac:不已:1.2.3
编制项目(':FontLibrary')
}
我使用的IntelliJ IDEA 13,其结果是:
摇篮'OSKExplorer项目刷新失败:
找不到com.commonsware.cwac:不已:1.2.3。
要求:
OSKExplorer:SwipeListViewComponent:未指定> OSKExplorer:CommonLibrary:不详
不知道是不是使用的 https://repo.commonsware.com.s3.amazonaws.com URL这么做是为了你,但我把Maven在{URL}位像这样:
allprojects {
库{
mavenCentral()
行家{URLhttps://repo.commonsware.com.s3.amazonaws.com}
}
}
GL!
On few github libraries like in here: https://github.com/commonsguy/cwac-endless I found references to repository stored on amazon.
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:
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:
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:
allprojects{
repositories{
mavenCentral()
maven{ url "https://repo.commonsware.com.s3.amazonaws.com"}
}
}
gl!
这篇关于摇篮不能从远程Maven仓库下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!