3

I am facing a strange problem for which I am totally unable to find the correct reason.

When I build an android project on my system(using eclipse and OS CentOS: Linux(Fedora)), the .apk size is 15Mb while when I compile the same code on my colleague's system(using eclipse On windows XP), the build size is 7Mb which is half the size of .apk build on my system.

Please help...

Ana
  • 841
  • 10
  • 28
  • 3
    What are the difference between thw two environments? is one using Android Studio and the other Eclipse? Is the number of resources different? – JoxTraex Mar 04 '14 at 05:38
  • 1
    You can use an archive program such as winrar to open the APK and browse the folder/file structure. Through this you should be able to find the differences. – Steven Trigg Mar 04 '14 at 05:51
  • @JoxTraex hi, I am using eclipse on both sides but Os is diffrent, Mine is centos(Fedora-Linux) and my colleague's is windows xp. – Ana Mar 04 '14 at 06:01
  • Check the optimization settings of eclipse, but it should not create this much difference, try unzip both apk and use beyond compare(or similar program) for quick folder comparison. – Pervez Alam Mar 04 '14 at 06:56
  • Did you copy the source from Windows to Linux? – tpbapp Mar 09 '14 at 04:32

3 Answers3

2

Check your /lib and /res folder if you are including unwanted libs and unwanted resources

Sharanabasu Angadi
  • 4,304
  • 8
  • 43
  • 67
1

The problem was in my libs.

There were .so files in my libs that were not being committed to Svn as subclipse by default ignores .so files . I found the issue here I fail to commit a .so library file using subclipse and the accepted answer of this question was perfect solution.

So now the .Apk on my colleague's system is same size as on mine(15mb).

Community
  • 1
  • 1
Ana
  • 841
  • 10
  • 28
1

I found a similar problem when moving source files from Windows to Linux. It seems there are various files that Windows sometimes adds to project folders such as Thumbs.db which, depending on the amount of project resources, can get fairly sizeable. On Windows file systems, these files are most likely detected as hidden when Eclipse/Android SDK reads through them to build the APK, on Linux however these would not be considered hidden and therefore could be getting bundled with the APK.

It would be worth checking the contents of the folders on both systems for hidden files and clean them.

tpbapp
  • 2,506
  • 2
  • 19
  • 21