HI WELCOME TO KANSIRIS

how to Change your app's target API level in andriod studio

Leave a Comment

 Open build.gradle under android/app/

find the android { } block

Change the following version to the below:

compileSdkVersion 27
buildToolsVersion "27.0.3"
minSdkVersion 16
targetSdkVersion 27

In case your current android/app/build.gradle has lines which look like :

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

You will have to edit the android/build.gradle to include :

buildscript {
    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 21
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "28.0.0"
    }
    ...
}


  • go to build.gradle file in your project
  • look for defaultTargetSdkVersion & defaultCompileSdkVersion
  • then change value to 26 enter image description here
  • Just open your build.gradle(Module: app) and change your compileSdkVersion and targetSdkVersion 26 or more than 26. enter image description here


0 comments:

Post a Comment

Note: only a member of this blog may post a comment.