1

I created a new project in android studio and choosed target minimum SDK then after creating new project how can i change minimum target SDK in android studio?

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Harsh Trivedi
  • 5,591
  • 3
  • 12
  • 14

2 Answers2

1

Update the gradle script of your module. Under the Gradle Scripts, the file is shown as build.gradle (Module : app). Not the build.gradle (Project : nameofproject)

this is an example of gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '25.0.0'

    defaultConfig {
        applicationId "com.project"
        minSdkVersion 18
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

change the minSdkVersion, to the desired one.

sync gradle and clean your project.

0

Upgrade your build.gradle file by changing minSdkVersion to whatever version you want: for e.g minSdkVersion 18

Clapa Lucian
  • 590
  • 2
  • 7
  • 14