I want to update my app on google play store, it can't accept the updated file with the same version.
Do I've changed the version from build.gradle file :
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "net.koorasudan.app"
minSdkVersion 14
targetSdkVersion 21
versionCode 5.1
versionName "5.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
But when I sync the gradle it shows me this error :
Error:(23, 0) Gradle DSL method not found: 'versionCode()' Possible causes:
The project 'SmartView 3' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file The build file may be missing a Gradle plugin. Apply Gradle plugin
How to solve this problem?