Using gradle, especially with how it integrates with Android Studio, is a much better solution. Google really got it right with gradle IMO, in that building from the IDE builds EXACTLY the same as if it were built from the command line with gradle. Building manually with bash like this just seems masochistic.