有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何解决这个“配置‘编译’已经过时,并被‘实现’和‘api’所取代”

当我尝试使用GitHub的问题时。我屈服了

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

我尝试使用材质日历视图

My gradle:

apply plugin: 'com.安卓.application'

安卓 {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId "com.mederov.timelord"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "安卓.support.test.runner.AndroidJUnitRunner"

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-安卓.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}



dependencies {
    compile 'com.applandeo:material-calendar-view:1.5.1'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.安卓.support.constraint:constraint-layout:1.1.3'
    implementation 'com.安卓.support:support-v4:28.0.0'
    testImplementation 'junit:junit:4.12'
    安卓TestImplementation 'com.安卓.support.test:runner:1.0.2'
    安卓TestImplementation 'com.安卓.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.安卓.support:appcompat-v7:28.0.0'
    implementation 'com.安卓.support:design:28.0.0'
    implementation 'com.安卓.support:recyclerview-v7:28.0.0'
    implementation 'com.github.bumptech.glide:glide:4.4.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
    implementation 'de.hdodenhof:circleimageview:3.0.0'

}

共 (1) 个答案

  1. # 1 楼答案

    您可以更改此行compile 'com.applandeo:material-calendar-view:1.5.1'

    到这个implementation 'com.applandeo:material-calendar-view:1.5.1'