Java 我在哪里可以找到我的项目中的 proguard.cfg?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20514881/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where do I find proguard.cfg in my project?
提问by
I want to enable the ProGuard
for my application and in this documentation ProGuardit says that the proguard.cfg
, where I have to modify something, is automatically generated. But if I look in my project folder I only see a proguard-project.txt
file but I dont see the proguard.cfg
which I need.
我想ProGuard
为我的应用程序启用 ,并且在本文档ProGuard 中,它说proguard.cfg
我必须修改某些内容的 是自动生成的。但是如果我查看我的项目文件夹,我只会看到一个proguard-project.txt
文件,但我没有看到proguard.cfg
我需要的文件。
How can I get this proguard.cfg? Or was I'm doing wrong?
我怎样才能得到这个 proguard.cfg?还是我做错了?
Please guid me to this file.
请引导我到这个文件。
采纳答案by GrIsHu
The documentation is slightly inaccurate. The generated file is proguard-project.txt
and will be in the root directory of your project.
文档有点不准确。生成的文件现在proguard-project.txt
并将位于项目的根目录中。
To enable Proguard
, you will need to ignore the "do not modify"
warning in project.properties
and uncomment the following line:
要启用Proguard
,您需要忽略"do not modify"
警告project.properties
并取消注释以下行:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
The Android tool chain will sometimes make changes to project.properties
, but your Proguard
path will be preserved.
Android 工具链有时会对 进行更改project.properties
,但您的Proguard
路径将被保留。
回答by Piyush
From this you can get your right way:
从这里你可以得到正确的方法:
i am searching for default.properties file for missing proguard.cfg
我正在寻找缺少 proguard.cfg 的 default.properties 文件