简体   繁体   English

APK中的外部库在哪里?

[英]Where do external libraries live in an APK?

I was wondering, when adding a external jar to a android project, where do they actually live inside the APK package? 我想知道,当将外部jar添加到android项目时,它们实际上在APK包中的什么位置? I can't seem to find them. 我似乎找不到它们。

Since Java usually loads classes at runtime as needed, it weirds me out that they don't seem to be in the distributable. 由于Java通常会在需要时在运行时加载类,因此令我感到奇怪的是,它们似乎不在可分发的范围内。

Is dex different? dex是否不同? are these static builds? 这些是静态版本吗?

If by "external libraries" you mean "library projects", the answer to this question can be found in the documentation : 如果用“外部库”来表示“库项目”,那么可以在文档中找到此问题的答案:

When you build an application that depends on a library project, the SDK tools compile the library into a temporary JAR file and uses it in the main project, then uses the result to generate the .apk. 当您构建依赖于库项目的应用程序时,SDK工具会将库编译为一个临时JAR文件,并在主项目中使用它,然后使用结果生成.apk。

The separate .jar s that you are referring to don't exist; 您所指的单独的.jar不存在; they are merged into a single .apk at compile time. 它们在编译时合并为单个.apk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM