android - 不推荐使用 Progruard 和 R8 - Android Studio 3.6
问题描述
在将我的 Android Studio 升级到 3.6 后,我收到了关于 Proguard 和 R8 的弃用警告。这是否意味着我们不应该在我们的项目中使用混淆,或者在发布模式下构建时我们应该考虑其他等效选项吗?
'android.enableR8' 选项已弃用,不应再使用。它将在未来版本的 Android Gradle 插件中删除,并且不再允许您禁用 R8。受影响的模块:等
解决方案
Does that mean we shouldn't use obfuscation in our projects
No. You can use obfuscation and optimization tooling.
is there another equivalent option we should consider while building in release mode
If you have android.enableR8 = true
in your gradle.properties
, remove it as R8 it the default tooling and the android.enableR8
setting itself is deprecated, causing these deprecation warnings.
If you have android.enableR8 = false
to use proguard for optimiation and obfuscation, consider migrating to R8 instead.
推荐阅读
- wordpress - 使用自定义 css 时 Elementor 标头中断
- dependency-injection - 在 Nest.js 中实现策略
- format - gcloud dns 托管区域列表以及记录集计数格式
- python - Jupyter Notebook 在运行大型 SQL 查询时崩溃
- jenkins - 詹金斯脚本化管道没有拉出 Github 存储库。下面是错误
- tensorflow - 无法使用 TF 2.4.1 将 onnx 模型转换为 tflite
- c - 为什么新创建的 windows 进程中有两个堆?
- bigdata - 为什么 DolphinScheduler 中的任务状态总是处于成功提交状态?
- excel - 将代码应用于由列中的数据组成的范围
- python - 什么是语法错误?=>使用 Pandas 将 xlsx 文件加载到 python 时出错