Android的Proguard的,删除所有日志报表和合并包 [英] Android Proguard, removing all Log statements and merging packages

查看:122
本文介绍了Android的Proguard的,删除所有日志报表和合并包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 我在我的项目约5包,是否有可能所有的包合并成一个大包,我想这样做是为了使黑客更难。

  2. 如何使用的ProGuard我删除我的源$ C ​​$ C到Log.e Log.d等所有引用。 (我有Eclipse的ADT使用ProGuard已经集成)。

更新:喜欢第2部分相貌可以这样做

  -assumenosideeffects类android.util.Log {
    公共静态*** D(...);
    公共静态*** V(...);
}
 

解决方案

选项-repackageclasses移动混淆类成一个给定的包:

<一个href="http://proguard.sourceforge.net/manual/usage.html#repackageclasses">http://proguard.sourceforge.net/manual/usage.html#repackageclasses

您可以选择与-allowaccessmodification结合起来效果会更好。

  1. I have about 5 packages in my project, is it possible to merge all the packages into one large package, I want to do this to make hacking more difficult.

  2. How do I remove all references to Log.e Log.d etc. in my source code using proguard. (I have the eclipse ADT with proguard integrated already).

Update: Looks like part 2 can be done like this

-assumenosideeffects class android.util.Log {
    public static *** d(...);
    public static *** v(...);
}

解决方案

The option -repackageclasses moves obfuscated classes into a single given package:

http://proguard.sourceforge.net/manual/usage.html#repackageclasses

You can optionally combine it with -allowaccessmodification for better results.

这篇关于Android的Proguard的,删除所有日志报表和合并包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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