将ShowcaseView API添加到gradle的问题

问题描述 投票:0回答:1

当我尝试将ShowcaseView API添加到gradle时我有一个错误 -

所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。发现版本28.0.0,23.1.1。示例包括com.android.support:animated-vector-drawable:28.0.0和com.android.support:support-v4:23.1.1 less ...(Ctrl + F1)检查信息:有一些库的组合,或工具和库,不兼容,或可能导致错误。一个这样的不兼容性是使用不是最新版本的Android支持库版本(或者特别是低于targetSdkVersion的版本)进行编译。问题ID:GradleCompatible

依赖:qazxsw poi

“implementation'com.android.support:appcompat-v7:28.0.0'”

这是我的傻瓜。

image

你能解释一下我做错了什么吗?以及如何将ShowcaseView api添加到我的项目中。预先感谢。

android android-gradle
1个回答
1
投票

我几分钟前就遇到了同样的问题。似乎showcaseview库不支持“实现”com.android.support:appcompat-v7:28.0.0'“

我的解决方法是将我的“compileSdkVersion 28”降级为“compileSdkVersion 26”。您可能还需要将所有实现更改为26而不是28。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.snailp4el.android.tatoeba"
        minSdkVersion 19
        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'
        }
    }

    dataBinding {
        enabled = true
    }
}

dependencies {
    implementation 'com.android.support:support-annotations:28.0.0'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:design:28.0.0'
    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'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'org.jsoup:jsoup:1.11.3'
    implementation 'org.jsoup:jsoup:1.11.3'
    implementation 'com.ichi2.anki:api:1.1.0alpha6'
    implementation 'com.github.amlcurran.showcaseview:library:5.4.3'

}

我相信这将是暂时的,直到库更新以支持上面的sdkversion 28。 Cheerio!

© www.soinside.com 2019 - 2024. All rights reserved.