【问题标题】:I Can't Generate Signed APK For This Error: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'我无法为此错误生成签名的 APK:配置“编译”已过时,已替换为“实现”和“API”
【发布时间】:2019-01-13 01:16:36
【问题描述】:

我无法为此错误生成签名的 APK:

配置“编译”已过时并已替换为 “实现”和“API”

请帮我解决这个问题?

gradle.build

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.1'
    defaultConfig {
        applicationId "net.gurujibd.ajkerkhobor"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testImplementation 'junit:junit:4.12'
    implementation 'com.google.android.gms:play-services-ads:11.0.1'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:appcompat-v7:28.0.0-beta01'
    implementation 'com.android.support:support-v4:28.0.0-beta01'
    implementation 'com.android.support:cardview-v7:28.0.0-beta01'
}

【问题讨论】:

标签: android gradle


【解决方案1】:

改变这一行

compile fileTree(include: ['*.jar'], dir: 'libs')

进入

implementation fileTree(include: ['*.jar'], dir: 'libs')

【讨论】:

    猜你喜欢
    • 2018-11-24
    • 1970-01-01
    • 1970-01-01
    • 2019-08-19
    • 2019-11-03
    • 1970-01-01
    • 2018-11-30
    • 2018-07-15
    • 1970-01-01
    相关资源
    最近更新 更多