proguard.cfg文件丢失 [英] proguard.cfg file missing

查看:205
本文介绍了proguard.cfg文件丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读文档上的ProGuard。 。 。 安卓文档

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的路径将是preserved。

The Android toolchain will sometimes make changes to project.properties, but your Proguard path will be preserved.

这篇关于proguard.cfg文件丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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