Fix building errors with gradle