proguard.cfg 文件丢失 [英] proguard.cfg file missing
问题描述
阅读有关 proguard 的文档...android 文档
Reading the docs on proguard . . . android docs
我应该有一个 ProGuard.cfg,因为它说...当你创建一个Android项目时,会在项目的根目录下自动生成一个proguard.cfg文件."
I'm supposed to have a ProGuard.cfg as it says... "When you create an Android project, a proguard.cfg file is automatically generated in the root directory of the project. "
如果我在谷歌上搜索这个问题,到处都有答案,他们中的大多数人都说要修改文件,并以警告开头不要修改文件.
If I google the issue there are answers all over the place most of them saying to modify a file that starts with a warning not to modify the file.
文档是否已过时?如何为发布版本启用此功能?谢谢,加里
Are the docs out of date? How to I get this enabled for release builds? thanks, Gary
推荐答案
如果您使用的是 ADT 17 或较新,文档有点不准确.生成的文件是proguard-project.txt
,会在你的项目根目录下.
If you're using ADT 17 or newer, the documentation is slightly inaccurate. The generated file is proguard-project.txt
and will be in the root directory of your project.
要启用 Proguard,您需要忽略 project.properties
中的请勿修改"警告并取消注释以下行:
To enable Proguard, you will need to ignore the "do not modify" warning in project.properties
and uncomment the following line:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
Android 工具链有时会更改 project.properties
,但会保留您的 Proguard 路径.
The Android toolchain will sometimes make changes to project.properties
, but your Proguard path will be preserved.
这篇关于proguard.cfg 文件丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!