00 Votes

Change Minimum API Level of Android Studio Project

Question by Guest | 2020-10-17 at 12:20

When creating a new project in Android Studio, you can set the Minimum API Level for the project quite easily.

However, how can I change the Minimum API Level for an existing project? I cannot find any option for that! Is there a way? I don't want to build up a new project just for changing that number.

ReplyPositiveNegative
Avatar
1Best Answer1 Vote

You do not have to create a new project for changing that. You only have to adjust the minimum SDK Version that is defined in the file "build.gradle (Module:app)" of your project. After opening your project in Android Studio, you will find that file in the tree structure on the left of the main window under "Gradle Scripts".

In this file, you will find something like that:

...

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.example.myapp"
        minSdkVersion 15
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        ...
    }
    ...
}

...

Now, you can just change the value behind minSdkVersion to the API level you want.

Alternatively you can change the level in the menu File > Project Structure > Modules > Default Config > Min SDK Version.
2020-10-17 at 22:20

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.