【问题标题】:Can not import clarifai api in android无法在android中导入clarifai api
【发布时间】:2017-02-09 11:47:30
【问题描述】:

我正在尝试在我的 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'
}

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

【问题讨论】:

    标签: android clarifai


    【解决方案1】:

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

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

    【讨论】:

    • 你知道android库的版本吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-08
    • 2016-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多