Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to Change my app's target API level from 23 to 26

I have a problem when i try to upload my app to google play console and it is the API level that is must be 26 and my app is just developped with 23 version and now i don't know how to change this API version from 23 to 26 to make it works without errors.

Help me please!

like image 652
Mahrez Avatar asked May 18 '18 05:05

Mahrez


People also ask

How do I change the API level of an app?

Step 1: Open your project in Android mode then go to Gradle Scripts > build. gradle(Module: app) as shown in the following image. Step 2: Refer to the below image and here you have to change the minSdkVersion and targetSdkVersion as per the requirement.

How do I change my API?

Selecting the version via the Developer HubGo to your Developer Hub and choose the relevant app. Then go to the Api Version menu, click on the Change version box and select your new version. Once you have selected the appropriate version for your app all subsequent API requests will use this version.


5 Answers

Steps:

  1. Go to File >Project Structure.
  2. select App Module in left panel
  3. select Flavour tab from the top menu tabs
  4. You can change the Min SDK version (In your case change Target SDK Version to 26)
  5. Click Ok

Reference: http://abhiandroid.com/androidstudio/change-api-sdk-level-android-studio.html

like image 158
Subrata Avatar answered Oct 19 '22 11:10

Subrata


you can change your API from build.gradle file. enter image description here

like image 44
Harish Rawal Avatar answered Oct 19 '22 11:10

Harish Rawal


However, there is answer that answered by friend below, just want to inform that if changing the version of the API. You also need to consider the library from the build.gradle app.

for example:

enter image description here

If you change the version, the default library file has to change to the version of your API version.

Example

implementation 'com.android.support:appcompat-v7:27.1.0' with my API version 27

like image 3
Kopi Bryant Avatar answered Oct 19 '22 10:10

Kopi Bryant


In the latest version of Android Studio as of dated 2020, perform the following steps:

  1. Click on Files (top left)

  2. Go to Project Structure (Ctlr + Alt + Shift + S)

  3. Click on modules

  4. In the right pane, click on Default Config (Middle one)
  5. Change Minimum SDK version
  6. Apply and click OK

Done!

like image 40
Vani Gupta Avatar answered Oct 19 '22 09:10

Vani Gupta


For those looking at this in Android Studio 3.5.3

  1. Go to File >Project Structure.
  2. Select Modules on the left panel
  3. Select app on center panel
  4. On the right panel, click on Default Config
  5. Change Target SDK Version to the required version

enter image description here

like image 3
Simo D'lo Mafuxwana Avatar answered Oct 19 '22 09:10

Simo D'lo Mafuxwana