fixed build issues and downgraded gradle