'Selected activity template has a minimum SDK level of 9

I can't create a new window on Android Studio. Error message shown in red "Selected activity template has a minimum SDK level of 9" how can I solve this issue ?

enter image description here



Solution 1:[1]

You have to open build.gradle and change the minSdkVersion to 16. Then, you have to rebulid the project. I fix that issue by this way

Solution 2:[2]

Chose an higher minimum API level (at least 14 for this template). Go back to the first step and change the minimum api level.

Solution 3:[3]

Selected Activity template has a minimum SDK level of X

Android Studio says so, because you've selected Minimum SDK version to be less than X. in you case SDK version less than 9 in the previous option.

See this:

enter image description here

I'd get the same error as yours, as I've set Minimum SDK to be : Android 1.1.

FIX:-

Choose an SDK version higher than 9.

In your case, it's ideal to choose API 16: Android 4.1(Jelly Bean) and above as more features would be supported from this version onwards.

Solution 4:[4]

Go to app level gradle file. You can find it from the gradle scripts -> build.gradle(Module:app). In android{defaultConfig{minSdkVersion}}} put 16 and Sync project from top right. This should solve your problem. This happens because the API Level expressed by an application will be compared to the API Level of a given Android system, which may vary among different Android devices. You can find more details here https://developer.android.com/guide/topics/manifest/uses-sdk-element

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bryam Guzmán
Solution 2 LoveAndroid
Solution 3 Community
Solution 4 Ananda