1

我无法从https://github.com/mikepenz/MaterialDrawer调整材料抽屉 6.0.2

构建.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.vlado.navigationsandfragments"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

    implementation("com.mikepenz:materialdrawer:6.0.2@aar") {
        transitive = true
    }

    //required support lib modules
    implementation "com.android.support:appcompat-v7:${versions.supportLib}"
    implementation "com.android.support:recyclerview-v7:${versions.supportLib}"
    implementation "com.android.support:support-annotations:${versions.supportLib}"
    implementation "com.android.support:design:${versions.supportLib}"
}

异常:错误:(38、0)无法为 org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler 类型的对象获取未知属性“版本”

我认为问题出在“必需的支持库模块”中,但如果我删除它们,应用程序没有错误并且不起作用。

4

0 回答 0