android库项目混淆 [英] android library project obfuscation

查看:94
本文介绍了android库项目混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个Android库,现在我想对其进行混淆处理以进行重新分发.我用eclipse和android 4.1.2版开发我的库.我试图用日食和护卫术来使人迷惑.我确实进行了导出,并且还将proguard.config = proguard-project.text放在了project-properties中,但是它没有生成任何jar文件.它显示了我的结果,因为它不允许图书馆项目.

Hi I developed one android library and Now I want to obfuscate it for redistribution. I develop my library with eclipse and android version 4.1.2. I tried obfuscating with eclipse and pro-guard. I do export and and also put proguard.config = proguard-project.text in project-properties but it not generating any jar file. It shows me result as its not allowing to library projects.

所以我不知道如何混淆android库项目.我需要有关如何混淆android库项目的帮助.

So I don't know how to obfuscating android library project. I need help regarding how to obfuscating of android library projects.

需要帮助谢谢.

推荐答案

Android SDK不会将ProGuard应用于库项目;它仅将ProGuard应用于最终应用程序(包括其库).后者在缩小,优化和混淆方面更有效,因为它可以处理更大的代码体,并且不需要保留库的公共API.

The Android SDK doesn't apply ProGuard to library projects; it only applies ProGuard to final applications (including their libraries). The latter is more effective in terms of shrinking, optimization, and obfuscation, because it can work on a larger body of code and it doesn't need to preserve the public API of the libraries.

如果您想将库作为最终产品分发,则可以对其进行后处理,如ProGuard手册>示例>

If you want to distribute your library as an end-product, you can post-process it, as discussed in the ProGuard manual > Examples > A typical library.

或者,ProGuard的Android商业同伴 DexGuard 也可以开箱即用地处理库项目.

Alternatively, DexGuard, ProGuard's commercial sibling for Android, can also process library projects out of the box.

(我是ProGuard和DexGuard的开发人员)

(I am the developer of ProGuard and DexGuard)

这篇关于android库项目混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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