I recently finished developing my app. and I want to change the target API level of the app to 21. Should I change it to 21 or leave it at 19? Also what changes would I have to make to the gradle file to make the target set to 21? Thanks
Asked
Active
Viewed 706 times
1 Answers
1
Go to the module's build.gradle
file (NOT the one for the project) and replace 19 with 21. It should look similar to below
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
minSdkVersion 8
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
Also change this in the manifest
<uses-sdk android:targetSdkVersion="21"></uses-sdk>

LumberHack
- 830
- 10
- 26
-
what version should I set for compile'com.android.support:support-v4:19.0.+' compile 'com.android.support:appcompat-v7:19.0.0', should I change them to 21 instead of 19 – artist Mar 28 '15 at 19:43
-
You could change it to `compile 'com.android.support:support-v4:21.0.3'` . Also you could accept the answer instead of upvoting .. – LumberHack Mar 28 '15 at 19:58