I know that this is already a few years after the question was asked, but I ran into this question, which I myself was looking for the same problem, and found a solution that worked for me, so I thought I would post it:
In your ant.properties "file for your project (create a new one if you don't have one) add these two lines:
This will remove “. *” From the default exclusion list, and therefore .nomedia will now be included in your resource directory inside your .APK.
source share