是否有可能使用的ProGuard在调试模式?有可能、模式、ProGuard

2023-09-05 09:57:53 作者:凉心的人却会说暖心的话i

在我的Andr​​oid应用程序,我想测试某些功能使用ProGuard上。

In my android app, i want to test some features with proguard on.

我并不需要真正的调试,但我想,当我在Eclipse打运行ProGuard的运行。我不希望每次导出二进制(因此,在释放模式),并保存为apk文件,并得到它的设备进行测试。

I don't need to really "debug" it, but i want proguard to run when i hit run in eclipse. I don't want to export the binary every time (so, in release mode) and save as apk and get it to the device to test.

有没有办法以这种方式运行ProGuard的?

Is there any way to run proguard in this way?

更新:

看起来这是可能的,如果你的不可以使用的的Eclipse ;作为问题标题不包括Eclipse中,有多个正确回答这个问题。

It seems like this is possible if you are not using Eclipse; as question title does not include Eclipse, there are multiple correct answers to this question.

推荐答案

的http:// developer.android.com/tool​​s/help/proguard.html

ProGuard的运行,当你建立在释放模式应用程序,所以你不必处理混淆code,当你建立在调试模式下您的应用程序。

在,无论是运行ant版本或通过使用导出向导在Eclipse构建在释放模式的应用程序,构建系统会自动检查,看看是否proguard.config属性设置。如果是,ProGuard的自动包装一切成的apk文件之前处理应用程序的字节code。 大厦在调试模式下不会调用ProGuard的,因为它使调试更加繁琐。

When you build your application in release mode, either by running ant release or by using the Export Wizard in Eclipse, the build system automatically checks to see if the proguard.config property is set. If it is, ProGuard automatically processes the application's bytecode before packaging everything into an .apk file. Building in debug mode does not invoke ProGuard, because it makes debugging more cumbersome.

更新:

似乎有可能与别人的用户已经回答了。请检查下面的答案以获取更多信息。

Seems it is possible with what others users have answered. Pls check the below answers for more information