{"id":823,"date":"2016-05-31T07:40:03","date_gmt":"2016-05-31T07:40:03","guid":{"rendered":"http:\/\/abhiandroid.com\/androidstudio\/?p=823"},"modified":"2018-06-05T07:17:18","modified_gmt":"2018-06-05T07:17:18","slug":"change-api-sdk-level-android-studio","status":"publish","type":"post","link":"https:\/\/abhiandroid.com\/androidstudio\/change-api-sdk-level-android-studio.html","title":{"rendered":"How To Change API SDK Level In Android Studio"},"content":{"rendered":"<p>Basically, API level means the Android version. This defines for which version you are targeting your application and what is going to be the minimum level of android version in your application will run. For setting Minimum level and Maximum level android studio provides two terminologies.<\/p>\n<p><strong>minSdkVersion<\/strong> means minimum Android OS version that will support your app and <strong>targetSdkVersion<\/strong> means the version for which you are actually developing your application. Your app will be compatible with all the version of android which are falling between minimum level SDK and target SDK.<\/p>\n<hr \/>\n<h4><strong>How to change API SDK level in Android Studio<\/strong><\/h4>\n<p>For changing the API level in android we have two different Approaches, let&#8217;s check both one by one:<\/p>\n<p><span style=\"color: #008000;\"><strong>Approach 1 To Change SDK API Level in Android Studio:<\/strong><\/span><\/p>\n<p><strong>Step 1<\/strong>: Open your Android Studio, and go to Menu. <strong>File<\/strong> &gt;<strong>Project Structure<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-832\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/project-structure-in-Android-Studio.jpg\" alt=\"project structure in Android Studio\" width=\"257\" height=\"175\" \/><\/p>\n<p><strong>Step 2<\/strong>: In project Structure window, select app module in the list given on left side.<\/p>\n<p><strong>Step 3<\/strong>: Select the <strong>Flavors<\/strong> tab and under this you will have an option for setting &#8220;Min Sdk Version&#8221; and for setting &#8220;Target Sdk Version&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-847\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/change-api-sdk-level-in-Android-Studio.jpg\" alt=\"change api sdk level in Android Studio\" width=\"638\" height=\"290\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/change-api-sdk-level-in-Android-Studio.jpg 638w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/change-api-sdk-level-in-Android-Studio-300x136.jpg 300w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/p>\n<p>You can check the name of version too in the drop down list while selecting the API level that makes the selection more clearer for anyone. Because sometimes remembering numbers is bit messy.<\/p>\n<p><strong>Step 4:<\/strong> Select both the versions and Click OK.<\/p>\n<hr \/>\n<p><strong>Approach 2 To Change API (Android Version) in Android Studio<\/strong>:<\/p>\n<p>That will be pretty straight forward, but you need to stay very alert while making changes here.<\/p>\n<p><strong>Step 1<\/strong>: if you are project is opened in android option then select open <strong>Gradle Scripts<\/strong> &gt; <strong>build.gradle(Module: app)<\/strong><\/p>\n<p>if you are in project View then click on your project folder &gt; <strong>app<\/strong> &gt; <strong>build.gradle<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-849\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/change-sdk-api-level-in-build-gradle-android-studio.jpg\" alt=\"change sdk api level in build gradle android studio\" width=\"359\" height=\"282\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/change-sdk-api-level-in-build-gradle-android-studio.jpg 359w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/change-sdk-api-level-in-build-gradle-android-studio-300x236.jpg 300w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Here you have to change minimum and Maximum sdk level as per your requirement. check the below given code:<\/p>\n<pre>defaultConfig {\r\n    applicationId \"com.AbhiAndroid.Android.myProject\"\r\n    minSdkVersion 14\r\n    targetSdkVersion 23\r\n    versionCode 1\r\n    versionName \"1.0\"\r\n}<\/pre>\n<p><strong>Step 3:<\/strong> Click on <strong>Sync Now<\/strong> and You are ready to go.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-850\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/sync-now-change-api-sdk-android-studio.jpg\" alt=\"sync now change api sdk android studio\" width=\"574\" height=\"261\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/sync-now-change-api-sdk-android-studio.jpg 574w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/sync-now-change-api-sdk-android-studio-300x136.jpg 300w\" sizes=\"auto, (max-width: 574px) 100vw, 574px\" \/><\/p>\n<p><strong>Note:<\/strong> If you are choosing the First Approach then you need not to make changes in Gradle. It will automatically update the gradle.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basically, API level means the Android version. This defines for which version you are targeting your application and what is going to be the minimum level of android version in your application will run. For setting Minimum level and Maximum level android studio provides two terminologies. minSdkVersion means minimum Android OS version that will support &hellip; <a href=\"https:\/\/abhiandroid.com\/androidstudio\/change-api-sdk-level-android-studio.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How To Change API SDK Level In Android Studio<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,70,1],"tags":[],"class_list":["post-823","post","type-post","status-publish","format-standard","hentry","category-android-studio","category-api","category-archieve"],"psp_head":"<title>How To Change API SDK Level In Android Studio \u2013 Abhi Android<\/title>\r\n<meta name=\"description\" content=\"Basically, API level means the Android version. Here step by step how to change API SDK level in Android Studio.\" \/>\r\n<meta name=\"robots\" content=\"index,follow\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/abhiandroid.com\/androidstudio\/change-api-sdk-level-android-studio.html\" \/>\r\n","_links":{"self":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/comments?post=823"}],"version-history":[{"count":1,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/823\/revisions"}],"predecessor-version":[{"id":1461,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/823\/revisions\/1461"}],"wp:attachment":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/media?parent=823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/categories?post=823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/tags?post=823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}