无法在android中导入clarifai api

时间:2017-02-06 16:52:38

标签: android clarifai

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

project.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
}

app.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'
}

我必须注意,导入其他库时没有任何问题。 提前谢谢。

1 个答案:

答案 0 :(得分:0)

您输入的库是错误的。这是正确的 -

compile 'com.clarifai.clarifai-api2:core:2.2.3'