【问题标题】:When I add facebook gradle dependency it shows me error in gradle当我添加 facebook gradle 依赖项时,它向我显示 gradle 错误
【发布时间】:2016-06-08 02:50:39
【问题描述】:

出现的错误

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
}

【问题讨论】:

  • 你在哪里编译com.android.support:customtabs:23.4.0

标签: android


【解决方案1】:

我看到这是最新版本:

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

而且你在这行 [4,5) 中有错误??

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-12
    相关资源
    最近更新 更多