gpt4 book ai didi

android - Gradle : DSL element 'useProguard' is obsolete and will be removed soon

转载 作者:行者123 更新时间:2023-12-03 15:47:28 25 4
gpt4 key购买 nike

自 Android Studio 3.5 更新以来,我在构建我的应用程序时收到此警告:

DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard..

最佳答案

中删除“useProguard” build.gradle 为我解决了这个问题,例如:

release {
minifyEnabled true
//useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
2022 年更新,或详细信息; R8现在是:
  • 默认启用,
  • 它只是替换了ProGuard ,

    But supports existing .pro files (and there should be no need to reconfigure).


  • 此外,任何禁用 R8 的方法,或使用 ProGuard相反,已弃用(甚至删除)。

    But debug flavors can set debuggable true, and continue to be debuggable line-by-line.


  • 关于android - Gradle : DSL element 'useProguard' is obsolete and will be removed soon,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57635963/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com