I want to change the targetSdkVersion from 19 to 18 in Android Studio (not Eclipse), but failed.
Android Studio complains the following after I changed the targetSdk
How to change targetSdkVersion and minSdkVersion in Android studio
Did have the same issue but mange to nail it down after a couple of hours.
Step 1
Open build.gradle - *Path\Your_Application\app\build.gradle*
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
Change targetSdkVersion & minSdkVersion values to what you desire.
Step 2
In Android stuido menu find "Build" ( alt + b @ windows ) and choose "Clean project"
Hope this help others with the same issue.