首页 > 解决方案 > 使用或覆盖已弃用的 API android.support.design.widget.NavigationView

问题描述

我有导航视图的问题。我没有改变任何东西,也不知道为什么这个错误现在出现在 build.gradle 中,我已经编译了 'com.android.support:design:26.1.0'。

在此处输入图像描述

我的 build.gradle

android {
    compileSdkVersion 26

    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId 'com.damageapp'
        minSdkVersion 22
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    } 
}

dependencies {
    implementation 'com.android.support:support-v4:26.1.0'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    annotationProcessor 'org.projectlombok:lombok:1.16.20'
    compile 'org.projectlombok:lombok:1.16.20'
    compile 'com.google.code.gson:gson:2.8.2'
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support.constraint:constraint-layout:1.1.3'

    compile 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.8.10'
    compile 'com.fasterxml.jackson.core:jackson-core:2.8.10'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.0'

    compile 'com.android.support:design:26.1.0'
    testCompile 'junit:junit:4.12'
    compile project(':BarcodeScannerLibrary')
    compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1'
}

我不知道我该如何解决。

标签: androidbuild.gradle

解决方案


推荐阅读