如何创建一个混淆的jar文件? [英] How to create an obfuscated jar file?

查看:102
本文介绍了如何创建一个混淆的jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何去创造一个模糊处理的jar文件?截至目前,我无法在Android的lib目录的项目很容易导出到一个罐子,并使用它。我如何混淆jar文件?

How can I go about creating an obfuscate jar file? As of now I can easily export my Android lib project to a jar and use it. How do I obfuscate the jar file?

我的最终目标是让其他人使用我的lib.jar在他们的项目。我只是想保护code,就像我可以... ...:)

My end goal is to allow others to use my lib.jar in their projects. I just want to protect the code as much as I can... :)

推荐答案

原来这是可能的,这并不难。尝试3小时后,我终于想通了!

Turns out it is possible and it's not that hard. After 3hrs of trying I finally figured it out!

Android提供下一个方便的ProGuard的图形用户界面:

Android provides a convenient proguard GUI under:

Android的SDK \工具\ ProGuard的

android-sdk\tools\proguard

使用GUI,你只需选择in.jar和out.jar。比你必须选择的android.jar并删除选定的默认rt.jar中。

Using the GUI you just select the in.jar and the out.jar. Than you must select the android.jar and remove the selected default rt.jar.

一旦这样做了,你必须仔细选择收缩和混淆选项。

Once that's done you must carefully select the Shrinking and Obfuscation options.

我希望以这种或那种方式这有助于!

I hope in some way or another this helps!

这篇关于如何创建一个混淆的jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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