0

我正在尝试在我的 android 项目中导入 clarifai api,但它给出以下错误:错误:(28、13)无法解决:com.clarifai.clarifai-api2:android:2.0.2

项目.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

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

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

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

应用程序.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "ir.codinglab.objectrecognizer"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {

        lintConfig rootProject.file('gradle/lint.xml')

    }
}

dependencies {
    compile 'com.github.markushi:circlebutton:1.1'
    compile 'com.clarifai.clarifai-api2:android:2.0.2'
        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'
    })
    testCompile 'junit:junit:4.12'
}

我必须注意,我在导入其他库时没有任何问题。先感谢您。

4

1 回答 1

0

您输入的图书馆是错误的。这是正确的——

compile 'com.clarifai.clarifai-api2:core:2.2.3'
于 2017-02-09T03:47:30.500 回答