IDE的Andr​​oid项目

IDE的Andr​​oid项目

本文介绍了如何混淆我的Eclipse IDE的Andr​​oid项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要尽量减少我的应用程序的大小,以及避免逆向工程的应用程序。任何人都可以帮助简单的答案?

I want minimize my app size as well as avoid the app from reverse-engineering. Can anybody help with simple answer?

推荐答案

Proguard的是部分Android的Eclipse插件,这样你就不必手动调用它。你只需要激活它在你的构建。

Proguard is part of the android eclipse plugin, so you do not have to invoke it manually.You just need to activate it on your build.

要启用ProGuard的,这样它的一部分运行的Ant或Eclipse构建,将 proguard.config 属性在< project_root> /project.properties 文件。路径可以是绝对路径或路径相对于项目的根目录。

To enable ProGuard so that it runs as part of an Ant or Eclipse build, set the proguard.config property in the <project_root>/project.properties file. The path can be an absolute path or a path relative to the project's root.

有关某些情况下,在proguard.cfg文件的默认配置就足够了。但是,很多情况下是很难ProGuard的正确分析,它可能会删除它认为不使用code,但您的应用程序实际上需要。一些实例包括:

For some situations, the default configurations in the proguard.cfg file will suffice. However, many situations are hard for ProGuard to analyze correctly and it might remove code that it thinks is not used, but your application actually needs. Some examples include:

  • ,这只是引用在AndroidManifest.xml文件中的类
  • 一个从JNI调用方法
  • 动态引用的字段和方法

默认proguard.cfg文件试图以支付:一般情况下,但你可能遇到例外情况,如ClassNotFoundException的,它发生在ProGuard的除掉一整类应用程序调用。

The default proguard.cfg file tries to cover general cases, but you might encounter exceptions such as ClassNotFoundException, which happens when ProGuard strips away an entire class that your application calls.

您可以修复错误时的ProGuard除掉你的code。通过在proguard.cfg文件中添加 -keep 行。

You can fix errors when ProGuard strips away your code by adding a -keep line in the proguard.cfg file.

这篇关于如何混淆我的Eclipse IDE的Andr​​oid项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-02 00:29