1

I have created an application on android, referring the "android-support-v4.jar" while compiling my application, so I want to know whether the generated apk will be bundled with the "android-support-v4.jar" or not?, If it gets bundled with the jar file then how can I ensure whether it is bundled or not?

Venkat
  • 413
  • 1
  • 5
  • 8

1 Answers1

2

Yes it will be bundled.

The classes you use from android-support-v4.jar have to be part of your .apk in the end. If they are not your app will crash because it refers to code that does not exist. If the app works you have successfully included it.

Edit: there is no .jar in the apk. The support classes are directly embedded with your classes into classes.dex.

zapl
  • 60,293
  • 10
  • 115
  • 141
  • I have unzipped my apk, but could not find the “android-support-v4.jar” – Venkat Apr 28 '12 at 15:24
  • Please let me know why I am unable to find compile time referrened .jar file after unzipping the apk file. – Venkat Apr 28 '12 at 15:40
  • oops, you are right, the content of the support jar is not included as jar but directly into `classes.dex` which is suddenly 250kb bigger. – zapl Apr 28 '12 at 15:41
  • Thanks for quick reply, can you please also let me know whether we can re-compile the jar "android-support-v4.jar" by getting the source code and its dependencies for compilation? – Venkat Apr 28 '12 at 17:21
  • http://stackoverflow.com/questions/8543225/android-support-library-v4-getting-the-source-and-attaching-it-to-the-library I guess – zapl Apr 28 '12 at 17:30