简体   繁体   中英

how sample android source codes are smaller than hello world android source code in eclipse?

我在eclipse中创建了hello world android应用程序,其中只有一个Java主要活动和一个xml布局文件,在drawable文件夹中没有任何图像,我从默认主题的值中删除了所有主题。当我看到源代码的大小为2.9 mb时,并且apk文件的大小为380 kb。但是当我在运行它后在eclipse中打开示例android应用程序时,我检查了源文件的大小为390 kb和apk大小为58 kb,并且在src文件夹中有6个Java文件,其中3布局中的xml文件和可绘制文件夹中的几张图像。您好,世界上没有记事本应用程序那么大的程序。我使用eclipse juno作为编辑器。如果有人知道答案,请帮助我。

朋友,我得到了我的问题的答案,这是因为我们在libs文件夹和apk中都使用了库android-support-v4.jar。在编写像hello world这样的小型应用程序时,这个jar文件没有用。在libs和android私有库中,因此源代码大小和apk大小将逐渐增加。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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