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 7889917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:13:12+00:00 2026-06-03T06:13:12+00:00

I have a question regarding how to obfuscate an Android library project. Overall, I’d

  • 0

I have a question regarding how to obfuscate an Android library project. Overall, I’d like to obfuscate an apklib file (or really the .java files for any library project) that contains both .java files (in the Android src/ directory) and XML files / external resources (in the Android res/ directory). I’d like to be able to distribute this library to other developers, similarly to the Facebook SDK library (https://github.com/facebook/facebook-android-sdk for reference). However, I want the code to be obfuscated so that my methods aren’t exposed in an easy to read manner.

I’ve tried using Proguard with Maven, but even after building my project with Proguard the files in my .apklib were not obfuscated. I also tried running Proguard manually, but I wasn’t able to have it output raw .java files (that could be referenced by another project as a library) instead of .class files.

If anybody has any information on how to obfuscate the java code in an apklib / Android library, I’d be very grateful. Additionally, it would also be very helpful to know if it isn’t possible to create an obfuscated andoroid library at all.

Thanks very much for your help.

Best,
Kevin

  • 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-03T06:13:14+00:00Added an answer on June 3, 2026 at 6:13 am

    Depending on how you set up the proguard goal of the android maven plugin you can most likely create an apklib that is obfuscated. I have however not tried myself. Keep in mind that proguard obfuscates into a secondary artifact potentially and not into the primary apklib.

    You should also keep in mind that if you obfuscate the library your users will have to use the obfuscated method names… which sort of defeats the purposed of the distribution and will make it very hard to use so it might be a bad idea. The only thing this would work is if you obfuscate all the code without obfuscating any public method and class names..

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

Sidebar

Related Questions

I have a question regarding the scheduleAtFixedRate() method on ScheduledExecutorService in Java 6. [
I have a question regarding inheritance in Java. If I have this base class
I have a question regarding threading in Java. In my code, ... client.doSth(); //
I have a question regarding how to use JSON integration in Android. For example
I have question regarding Java Comparator. Or maybe you all have another Idea to
I am writing my own Graph library Graph++ , I have question regarding what
I have a question regarding the Impersonation on WCF. I'd like to connect to
I have a question regarding the verification of executable files, compiled with visual studio,
I have a question regarding django templates and html frameset's. I would like to
I have a question regarding file reading and I am getting frustrated over it

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.