How to obfuscate my android project in eclipse IDE?

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

  • Create TextView from template XML file
  • How can I remove title and icon completetly in Actionbar sherlock?
  • insert and remove fragments into viewpager properly
  • Xamarin forces me to download Android SDK and NDK
  • Is it possible to launch a DialogFragment from a Preference in a PreferenceActivity?
  • Android Labels or Bubbles in EditText
  • Related posts:

    Seek bar, change path color from yellow to white
    Prevent other language except English in EditText
    How do I get the background color of a TextView?
    Unable to execute dex: Multiple dex files define Lbolts/AggregateException
    AssertionFailedError in ApplicationTestCase.createApplication() in newer Android versions when using...
    Transfer data over sound in Android
  • Include Ruboto-Core with Android app on install
  • SQLite: Cannot bind argument at index 1 because the index is out of range. The statement has 0 parameters
  • How can I make sure a window always showing above soft keyboard?
  • Android Scrolling Effect (Google I/O app)
  • get coordinates by clicking on map (openstreetmaps)
  • NullPointerException in SharedPreferences Android
  • 5 Solutions collect form web for “How to obfuscate my android project in eclipse IDE?”

    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.

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

    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:

    • a class that is referenced only in the AndroidManifest.xml file
    • a method called from JNI
    • dynamically referenced fields and methods

    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.

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

    1) Download latest proguard from “”. Current latest version is proguard4.7

    2) Replace “bin” and “lib” folder of “path of your SDK\tools\proguard” with latest downloaded proguard folders.

    3) Check SDK location in eclipse for blank spaces in it and for that go to window > Preferences > Android. If there is blank space then replace it with:

    Pathe of Android SDK

    4) Check that proguard.cfg file is in your project’s root folder and add “proguard.config=proguard.cfg” in file of android project.

    5) Now export your project to get obfusticated apk.

    Yes it is possible to restrict app for reverse engineering using enabling proguard in your project Your should read this tutorial for it
    Proguard for Android app

    and for minimize app size you should sue .9patch images, and selector..

    You can use proguard for this. It is a tool provided by Google for the same purpose. See the official guide here:

    You can give a try to Dexguard, can add more layers of obfuscation, applying string encryption, class encryption, and reflection. It’s not free, but it goes beyond than proguard.

    PD) It’s not spam, I don’t have any relation with this product, just information.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.