Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8082543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:08:45+00:00 2026-06-05T17:08:45+00:00

I was asked to crate a simple app for android. The first one in

  • 0

I was asked to crate a simple app for android. The first one in fact that I’ll be paid for, so I really don’t want to screw it up :). One of the requirements was that the code must be obfuscated.

I learned the general idea of obfuscating, but I don’t want to make any silly mistakes.

What precisely do I have to do to make the code obfuscated? Does exporting it as release do the job, or some other steps are required? Any remarks are also appreciated.

PS. I’m using Eclipse if it matters.

EDIT

From the article suggested in the anwsers:

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

If you left the proguard.cfg file in its default location (the
project’s root directory), you can specify its location like this:

proguard.config=proguard.cfg

I indeed have the project.properties file in my project’s dir. But I don’t have the proguard.cfg file. Instead I have the proguard-project.txt file. I guess it’s a replacement.

project.properties:

This file is automatically generated by Android Tools.
Do not modify this file — YOUR CHANGES WILL BE ERASED!

This file must be checked in Version Control Systems.

To customize properties used by the Ant build system edit
“ant.properties”, and override values to adapt the script to your
project structure.

To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):

proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt

Project target.
target=android-7

Originally everything but the last line is commented out.

In proguard-project.txt everything is commented out.

I guess I’m lost here, so I’d be very thankful If somebody could tell me step by step what I am supposed to do and also how to check if it actually works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:08:49+00:00Added an answer on June 5, 2026 at 5:08 pm

    The article on the official dev site is out of date. Starting with SDK Tools r17 they changed the way the ProGuard configuration works. Basically they split what used to be proguard.cfg into two files (and also simply made them .txt files): proguard-android.txt and proguard-project.txt. proguard-android.txt resides in your {SDK dir}\tools\proguard directory and proguard-project.txt is in each of your project directories.

    They split the file so that general configuration/flags that the Android team deems pretty standard will be in the proguard-android.txt file and can be updated (basically silently) with each SDK Tools revision. And then any developer/project specific flags, the developer can add to the proguard-project.txt file.

    This is why you noticed everything in your proguard-project.txt file was commented out, because in general most people don’t have any project specific needs, they just want to run ProGuard with standard settings and be done with it.

    For reference (a very good explanation): http://tools.android.com/recent/proguardimprovements

    Step-by-Step (day by day :P)

    (Using Eclipse IDE) To enable ProGuard and it’s shrinking and obfuscation using only the default settings:

    • First update your SDK Tools to newest (r19 at time of writing)
    • In project.properties uncomment the line that says:

    proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt

    If you created the project before r17 then you might not see the same things. If that’s the case I suggest you create a new dummy project (after updating SDK Tools) and just copy over the proguard-project.txt and project.properties files.

    That’s it! ProGuard will now be enabled and it will run, but only on release builds (when you use Android Tools and export a signed/unsigned apk).

    When you make a release build you’ll notice that a new ProGuard folder will be created in your project folder. Within this folder you find four files with stuff like what classes/methods were kept or removed. Also note that when you obfuscate, you’ll also obfuscate your stacktraces in the event of errors.

    Edit: (9/4/12) Just wanted to update this answer to reflect changes in Tools r20.

    The Android team has now added one additional proguard configuration file. It is proguard-android-optimize.txt and it also resides in the {SDK dir}\tools\proguard directory. This file is the same as the original proguard-android.txt config file, except it has proguard optimization turned on.

    This additional file was added for convenience for those who wanted to turn on optimizations (maybe so they can do stuff like strip out Log calls, which requires optimizations be turned on). Now you can simply point to this file instead in your project.properties file like so:

    proguard.config=${sdk.dir}\tools\proguard\proguard-android-optimize.txt:proguard-project.txt
    

    As before, don’t try to alter any of the proguard-android... config files. Any project specific flags should go in the proguard-project.txt file in your project folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My company makes desktop software and we want to create an iPhone app that
Simple question, asked before but no one gave me the right answer so I'm
I've been asked to create a simple calculations page that will have simple text
Iam a beginner in rails 3. I want to create a simple App. In
I'm a newbie making a really simple app in rails, but I have no
I am new to web programming...I have been asked to create a simple Internet
I was asked to create a very simple dashboard using a Sharepoint list as
I've been asked to create a plugin similar to this one for a project
i have asked to create a module that will record video messages form the
I have been asked to create a vbscript that will set the default font

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.