已弃用Progruard和R8-Android Studio 3.6 [英] Progruard and R8 being deprecated - Android Studio 3.6

查看:583
本文介绍了已弃用Progruard和R8-Android Studio 3.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将Android Studio升级到3.6之后,关于Proguard和R8的警告已过时.这是否意味着我们不应该在项目中使用混淆功能,还是在发布模式下构建时应该考虑其他等效选项?

I'm getting deprecated warnings in regards to Proguard as well as R8 after upgrading my Android Studio to 3.6. Does that mean we shouldn't use obfuscation in our projects or is there another equivalent option we should consider while building in release mode?

不建议使用'android.enableR8'选项,并且不再使用. 它将在未来版本的Android Gradle插件中删除,并且不再允许您禁用R8. 受影响的模块:等

The option 'android.enableR8' is deprecated and should not be used anymore. It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8. Affected Modules: etc

推荐答案

这是否意味着我们不应该在项目中使用混淆处理

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

如果gradle.properties中有android.enableR8 = true,请将其作为R8删除,这是默认工具,并且不建议使用android.enableR8设置本身,从而导致这些弃用警告.

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.

如果您有android.enableR8 = false可以使用proguard进行优化和混淆,请考虑迁移到R8.

If you have android.enableR8 = false to use proguard for optimiation and obfuscation, consider migrating to R8 instead.

这篇关于已弃用Progruard和R8-Android Studio 3.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆