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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:52:22+00:00 2026-06-10T12:52:22+00:00

I am using the latest Android SDK (4.1) and I tried exporting a signed

  • 0

I am using the latest Android SDK (4.1) and I tried exporting a signed jar with Proguard enabled. However, after decompiling the optimized APK, I noticed that methods that I would have expected to be inlined were not.

I know that Proguard ran because the code was correctly obfuscated. So to confirm this, I added this method to my Activity:

private void testInlining()
{
    mConfig = null;
}

This private method is called only once in my activity, and because it is private, it should be very obvious to the optimizer that it is called only once and that it should be inlined.

The documentation says that all optimizations are enabled by default, and that Proguard “Inline methods that are short or only called once”.

Is there a specific flag I should give to Proguard to enable inlining?

EDIT

My proguard configuration file contains

-optimizationpasses 5
-allowaccessmodification
-overloadaggressively
-repackageclasses ''
-dontskipnonpubliclibraryclasses

EDIT

After using

-whyareyoukeeping class com.templatecompany.templateappname.EntryPointActivity {*;}

I get the reason why the method is not inlined:

 [proguard] com.templatecompany.templateappname.EntryPointActivity: void testInlining() (20:21)
 [proguard]   is invoked by    com.templatecompany.templateappname.EntryPointActivity: com.td.media.ivConnection.IvConfig getIvConfig() (14:15)
 [proguard]   implements       com.td.widget.MainActivity: com.td.media.ivConnection.IvConfig getIvConfig()
 [proguard]   is invoked by    com.td.widget.MainActivity: void onCreate(android.os.Bundle) (140:175)
 [proguard]   implements       android.app.Activity: void onCreate(android.os.Bundle)
 [proguard]   is a library method.

But I am not sure to see how the fact that the method testInlining is used in the method getIvConfig which is in turn used by another method prevents the inlining on testInlining in getIvConfig.

  • 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-10T12:52:24+00:00Added an answer on June 10, 2026 at 12:52 pm

    This recent Android SDK disables all optimizations by default, see ${sdk.dir}/tools/proguard/proguard-android.txt:

    -dontoptimize
    

    The alternative optimizing configuration only disables a few optimizations, see ${sdk.dir}/tools/proguard/proguard-android-optimize.txt:

    -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
    

    You can specify your preferred configuration file in project.properties.

    You can verify which complete configuration ProGuard is using by adding the option -printconfiguration.

    Some optimizations have been disabled in order to avoid bugs in older versions of the Dalvik VM (!code/simplification/arithmetic,!code/simplification/cast), and some optimizations may have been disabled to avoid bugs in older versions of ProGuard (!field/*,!class/merging/*).

    Note that -whyareyoukeeping refers to the shrinking step, which removes unnecessary classes/fields/methods as a whole. Methods that are not removed may be inlined in the optimization step (unless explicitly specified otherwise with -keep).

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

Sidebar

Related Questions

I'm using android-mips-ndk-r5b-windows and latest sdk , I'm targeting Android 2.2 cygwin 1.79 the
I'm using Eclipse to develop Android apps. I'm using the latest SDK and Eclipse
After introducing latest changes in Android SDK and Android Market it's now more or
I am using latest Google IMA SDK for video ads, in that the flash
I'm using the latest version of the jquery plugin DataTables and I tried to
I've just reinstalled eclipse indigo (32bit) and the latest Android SDK. The Android Emulator
Android SDK Manager complains WARNING: Java not found in your path. Instead of using
I developed my app using Mono for Android. I have the latest version 4.0.3.
First time developing for Android. I've noticed that the latest SDK is v4.x but
Are the following actions possible using the latest version of the Android API?: Temporarily

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.