【问题标题】:Implementation support v-13 and v-7 in gradle Androidgradle Android 中的实现支持 v-13 和 v-7
【发布时间】:2018-10-01 10:15:45
【问题描述】:

我正在尝试在 android 中使用 tensorflow lite,我必须在一个类中实现 FragmentCompat.OnRequestPermissionsResultCallback。

我已经读到我应该在 gradle 中这样写:

implementation 'com.android.support:support-v13:version_of_library'
implementation 'com.android.support:appcompat-v7:24.0.0'

我已经在我的 gradle 中添加了这个,但是这行有一个错误,这个:

androidTestImplementation 'com.android.support.test:runner:1.0.2'

这是我的毕业典礼:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "midlaboratories.reconocimientoconcamara"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation project(':openCVLibrary340')
    implementation 'com.google.android.gms:play-services-vision:15.0.2'
    implementation 'org.tensorflow:tensorflow-lite:+'
    implementation 'com.android.support:support-v13:version_of_library'
    implementation 'com.android.support:appcompat-v7:24.0.0'
}

有人知道解决办法吗?

【问题讨论】:

  • 试试这个:实现 'org.tensorflow:tensorflow-lite:1.10.0'
  • 我已经尝试过了,但错误仍然存​​在: implementation 'com.android.support:support-v13:version_of_library', implementation 'com.android.support:appcompat-v7:24.0. 0 和 androidTestImplementation 'com.android.support.test:runner:1.0.2'
  • 对于compileSdkVersion 28,兼容库的正确版本也来自 28 系列。请参阅developer.android.com/topic/libraries/support-library/packages,对于appcompat-v7support-v13,当前版本为28.0.0version_of_library 不是一个版本,而是有人暗示你应该在那里放置一个正确的版本。

标签: android android-gradle-plugin android-support-library


【解决方案1】:

试试这个设置:

implementation 'org.tensorflow:tensorflow-lite:1.10.0' 
implementation 'com.android.support:support-v13:28.0.0' 
implementation 'com.android.support:appcompat-v7:28.0.0' 

而不是这个

implementation 'org.tensorflow:tensorflow-lite:+'
implementation 'com.android.support:support-v13:version_of_library'
implementation 'com.android.support:appcompat-v7:24.0.0'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-28
    • 2021-02-12
    • 2021-05-11
    • 1970-01-01
    相关资源
    最近更新 更多