从Maven导入远程库

时间:2014-05-07 10:22:49

标签: android maven gradle

我试图将amlcurran和Android-DirectoryChooser的Showcaseview通过passy添加到我的Android应用程序MavenCentral中,但我不断为这两个库添加此错误:

Error:net.rdrei.android.dirchooser:library:2.0

这是我的Project Gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.9.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

这是内在的:

apply plugin: 'android'

android {
    lintOptions {
        checkReleaseBuilds false
    }

    compileSdkVersion 19
    buildToolsVersion "19.0.3"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19
        versionCode 6
        versionName "1.2.2"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}


dependencies {
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile 'org.jaudiotagger:jaudiotagger:2.0.1@jar'
    compile 'com.android.support:support-v4:19.1.0'
    compile 'net.rdrei.android.dirchooser:library:2.0@aar'
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

我该如何解决?

1 个答案:

答案 0 :(得分:1)

问题是您没有指定存储库URL。在这里查看我的答案: https://stackoverflow.com/a/23879736/570612