Go and check out this… How to fix android.defaultConfig.versionCode is set to -1, but it should be +ve error