我正在使用 Android ADT 16 运行 Eclipse Indigo。我的项目是 Android 2.2 (API 8)。我已将 proguard.cfg
文件添加到项目根目录,并将以下行添加到 default.properties
和 project.properties
:
proguard.config=proguard.cfg
当我使用 Eclipse Export 向导时,生成了一个 .apk 文件,但它看起来和我启用 ProGuard 之前一样大,而且我的项目中没有 proguard/
子目录根目录。所以 ProGuard 似乎没有运行。从 Eclipse 启用 ProGuard 还需要哪些其他步骤?
谢谢 汤姆
最佳答案
您是否尝试过导出已签名的 apk 包? Proguard 仅在创建发布版本时运行。
http://developer.android.com/guide/developing/tools/proguard.html
ProGuard is integrated into the Android build system, so you do not have to invoke it manually. ProGuard runs only when you build your application in release mode, so you do not have to deal with obfuscated code when you build your application in debug mode. Having ProGuard run is completely optional, but highly recommended.
关于android - ProGuard 不是从 Eclipse 运行的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9390519/