Just to confirm: - yes all your jar files go into classes.dex. If those have resources, they'll just be put in the apk as they were in the .jar file.
The /data/dalvik-cache files are/extracted/optimized version of the classes.dex. When you install an app, it takes your classes.dex and optimize it based on your device architecture. It also acts as extracting the classes.dex from the apk zip archive for direct access. The jar files in /system/framework/ do not contain .class files, instead they just contain a single classes.dex (like any apk file). Xav On Thu, Oct 8, 2009 at 3:52 PM, jotobjects <[email protected]> wrote: > > Answering my own questions - > > The dex file can be examined with dexdump.exe in the tools directory. > > The classes from the jar are included with the rest of the application > classes in the classes.dex file. > > The maps api implementation jar file is on the device in the /system/ > framework directory. > > On Oct 5, 4:46 pm, jotobjects <[email protected]> wrote: > > Thanks for those clarifications - this is very helpful. Two more > > questions: > > > > I created a jar file in my project lib directory and used some classes > > in the jar file. It works when I install it, but when I look at the > > apk file (with jar -t) I don't see the lib directory. When I look on > > the device with adb shell I see an empty lib directory. So where does > > my jar file wind up in the apk and on the device? I'm guessing it's > > been bundled in the classes.dex file but I don't know how to examine > > the contents of the dex file. > > > > Regarding the Maps api. I see what might be the implementation jar > > in /data/dalvik-cache named > > sys...@[email protected][email protected] > > Is that the "shared library" aka "external library" (i.e., not a > > native linux .so shared library)? > > > > On Oct 2, 7:33 pm, Xavier Ducrohet <[email protected]> wrote: > > > > > On Fri, Oct 2, 2009 at 1:29 PM,jotobjects<[email protected]> wrote: > > > > > > This is an area that I am confused about also. The term "external > > > > library" is perhaps overloaded with a different meaning in Android > SDK > > > > vs. in Eclipse build environment (which I don't use anyway). > > > > Apparently this term in Android refers to a Linux platform shared > > > > library? > > > > > Correct they are optional system-level libraries. > > > > > > I think Dianne in this thread is saying that the <uses-library> is > > > > only for shared libraries that are built-in to the device (emulator > > > > image)? > > > > > Yes. Since the maps library is Google proprietary, it's not part of > > > the default SDK system image, and we ship a Google add-on that not > > > only gives access to the API, but also includes a custom emulator > > > system image that does have this system library. > > > > > > And an application can NOT install a shared library? > > > > > Correct. > > > > > > Also I think that if you have a jar in your project lib directory > that > > > > WILL be included in the apk package? > > > > > Correct in Ant, in Eclipse you have to add it to the build path. > > > > > > And finally, from a recent thread, note that the maps.jar included > > > > with the SDK is a stub for compile time linking and is NOT the > > > > complete maps API that has to be installed on the device as a shared > > > > library outside the application's control as mentioned above. > > > > > That is correct. Like android.jar, maps.jar only contains the public > > > API. It does not include all classes the maps library present on the > > > system, and the included classes have no code (they all throw an > > > exception). > > > > > Xav > > > -- > > > Xavier Ducrohet > > > Android SDK Tech Lead > > > Google Inc. > > > -- Xavier Ducrohet Android SDK Tech Lead Google Inc. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

