当我添加facebook gradle依赖时,它显示我在gradle中的错误

时间:2016-05-29 09:29:08

标签: android

出现错误

Error:Failed to resolve: com.android.support:customtabs:23.4.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:G:/ANDROID APP VRIKSH APP/News/News/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

Error:Failed to resolve: com.android.support:support-v4:23.4.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:G:/ANDROID APP VRIKSH APP/News/News/app/build.gradle">Open File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

// Build.gradle(app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.appvriksh.news"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:support-v4:23.2.0'
    compile 'com.android.support:support-v13:23.2.0'
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}

// Build.gradle(项目) //顶级构建文件,您可以在其中添加所有子项目/模块共有的配置选项。

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

1 个答案:

答案 0 :(得分:0)

我认为这是最新版本:

compile 'com.facebook.android:facebook-android-sdk:4.12.1'

你也有错误[4,5] ??