Android Studio 3.4:更改具有最终值的属性值已被弃用。在 Gradle 6.0 中这将失败并出现错误

2023-12-30

我在 Android Studio 3.4 的构建输出控制台中收到以下警告:

任务:app:processDebugResources 更改具有最终值的属性值已被弃用。在 Gradle 6.0 中这将失败并出现错误。

这是我的 build.gradle(Module:app) 文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.xscoder.myapp"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        // Enabling multidex support.
        multiDexEnabled true

        aaptOptions { cruncherEnabled = false }

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    dexOptions { javaMaxHeapSize "4g" }
}

repositories {
    google()
    mavenCentral()
    jcenter()
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:design:27.1.1'
    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'
    testImplementation 'junit:junit:4.12'

    // Parse
    implementation "com.github.parse-community.Parse-SDK-Android:parse:1.18.6"
    implementation "com.github.parse-community.Parse-SDK-Android:fcm:1.18.6"
    implementation 'com.parse.bolts:bolts-android:1.4.0'


    // CircleImageView
    implementation 'de.hdodenhof:circleimageview:3.0.0'

    // Facebook
    implementation 'com.facebook.android:facebook-android-sdk:4.37.0'
    implementation 'com.parse:parsefacebookutils-v4-android:1.10.7@aar'

    // Google & Firebase
    implementation 'com.google.android.gms:play-services-ads:17.2.0'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.firebase:firebase-core:16.0.8'
    implementation 'com.google.firebase:firebase-messaging:17.6.0'
}

apply plugin: 'com.google.gms.google-services'

一切都很好,应用程序运行顺利,但我想知道 Gradle 6.0 何时可用,那么什么可能导致该任务被弃用?


Try to Run这可能会有所帮助

./gradlew clean
rm -rf ~/.gradle/caches/*
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android Studio 3.4:更改具有最终值的属性值已被弃用。在 Gradle 6.0 中这将失败并出现错误 的相关文章

随机推荐