Progruard and R8 being deprecated - Android Studio 3.6

霸气de小男生 提交于 2020-03-21 12:00:55

问题


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?

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


回答1:


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.



来源:https://stackoverflow.com/questions/60397617/progruard-and-r8-being-deprecated-android-studio-3-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!