当前位置:   article > 正文

【Android】gradle7.0.4遇到问题The option ‘android.enableBuildCache‘ is deprecated解决方案_it was removed in version 7.0 of the android gradl

it was removed in version 7.0 of the android gradle plugin.

AndroidStudio运行报错
在这里插入图片描述

An exception occurred applying plugin request [id: ‘com.android.application’]
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升级到了7.0.4版本之后出现的新报错
在这里插入图片描述

解决方案:
在这里插入图片描述
找到这个路径下名叫 gradle.properties 的文件,由于我的是改了路径的,所以我的在G盘
在这里插入图片描述
android.enableBuildCache=true 注释掉 即可

修改前:
在这里插入图片描述
修改后
在这里插入图片描述
修改后保存重新运行即可!问题解决

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/244342
推荐阅读
相关标签
  

闽ICP备14008679号