升级到Gradle 7.0后出现"The option ‘android.enableBuildCache‘ is deprecated. The current default is ‘fal...

个人CSDN文章

这篇是应为看见有人查看处理方法要付钱恶心到了才发的,我不希望互联网成为付联网 ,如果以后所以代码或所以解决问题的方法都需要付费才能看我觉得这是对互联网的侮辱和破坏,会限制其发展


一、问题

android studio升级到Gradle 7.0后出现的问题

A problem occurred evaluating project ':app'.

> Failed to apply plugin 'com.android.internal.application'.

  > The option 'android.enableBuildCache' is deprecated.

    The current default is 'false'.

    It was removed in version 7.0 of the Android Gradle plugin.

    The Android-specific build caches were superseded by the Gradle build cache (https://docs.gradle.org/current/userguide/build_cache.html).

二、解决方法

去项目里找到gradle.properties文件,把 android.enableBuildCache=true 和 android.buildCacheDir=./build/buildCache/注销掉,原因不知,亲测有效,代码如下:

#Wed Feb 26 13:11:31 CST 2020

android.enableJetifier=true

org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"

#android.buildCacheDir=./build/buildCache/

android.useAndroidX=true

android.enableD8=true

#android.enableBuildCache=true

版权声明:本文为CSDN博主「He Junming」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/a925379434/article/details/120757133

你可能感兴趣的:(升级到Gradle 7.0后出现"The option ‘android.enableBuildCache‘ is deprecated. The current default is ‘fal...)