Eror解决:com.roughike:bottom-bar:1.4.0.1

时间:2016-09-11 11:50:29

标签: android

当我尝试使用库解析时:com.roughike:bottom-bar:1.4.0.1我收到错误 如果我应该做的提示,我将不胜感激? 的build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24"
    defaultConfig {
        applicationId "com.maleki.royalvas.rbottom"
        minSdkVersion 14
        targetSdkVersion 24
        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.roughike:bottom-bar:1.4.0.1'
    compile 'com.android.support:appcompat-v7:24.1.1'
    testCompile 'junit:junit:4.12'
}

Eror:

Error:(26, 13) Failed to resolve: com.roughike:bottom-bar:1.4.0.1

1 个答案:

答案 0 :(得分:0)

allprojects添加jcenter()内的顶部 build.gradle (不是应用模块中的哪一个,您将在项目模块中找到)中尝试此操作。 所以看起来应该是这样的

allprojects {
    repositories {
        jcenter()
    }
}

然后同步您的项目。