Skip to content Skip to sidebar Skip to footer

Raw Assets Duplicated When Building Apk

When building my application APK, the final APK is twice as big as my Eclipse project folder. I was perplexed as to why this was happening, I'd like to keep my app as small as poss

Solution 1:

The APK file will contain a res/raw/ directory, containing the sole copy of your raw resources for that APK. Eclipse and Ant will not add a /raw directory to your APK, at least not if you use a normal build process.

For example, you examine this sample project, you will find that the resulting APK file has one copy of the OGG raw resource, not two.

Solution 2:

what happened between normal apk structure and duplicated one

enter image description here

how to duplicate this issue, by using res folder as source folder (add to build path) enter image description here

remove res folder from build path would do the job enter image description here

Solution 3:

Okay this isn't an answer at all, I'm still no clearer on what was going wrong with my project.

I did however manage to stop the files being duplicated in my APK build, by copying all my res files out of my workspace, deleting the res folder from within Eclipse (deleting the files as well). Then finally recreating the entire res structure by hand and re-adding all the raw assets by drag dropping them into Eclipse.

Post a Comment for "Raw Assets Duplicated When Building Apk"