bug fixes.
updated gradle build file, needed for the migration from android gradle plugin 0.8 to 0.9.