Make sure that the width and height are greater than 0 before updating the bitmap.
Added gradlew.