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 ?
-
1Possible duplicate of [Changing API level Android Studio](http://stackoverflow.com/questions/19465049/changing-api-level-android-studio) – Tim Biegeleisen Nov 02 '16 at 04:50
4 Answers
Chose an higher minimum API level (at least 14 for this template). Go back to the first step and change the minimum api level.
![](../../users/profiles/6949280.webp)
- 176
- 11
-
-
@Fahda.Shalhoub when you create the new project then it ask in the second step for the minimum sdk then set the minimum sdk to 16.your problem has been solved. – LoveAndroid Nov 02 '16 at 05:05
-
but I opened exist project so its open diractlly without asking me for the minimum SDK – Fahda.Shalhoub Nov 02 '16 at 05:54
-
1@Fahda.Shalhoub then go to the build.gradle(module)file and change the minSdkVersion to 16. – LoveAndroid Nov 02 '16 at 05:58
-
-
@Fahda.Shalhoub please tell me what is the problem.are you getting exception or what ?? – LoveAndroid Nov 02 '16 at 06:27
-
I changed minSdkVersion to 16 then i tried to create a new activity but its still shown the same error massage "Selected activity template has a minimum SDK level of 9" – Fahda.Shalhoub Nov 02 '16 at 06:33
-
@Fahda.Shalhoub i think you should create new project with the minsdkversion 16 and with the empty activity. – LoveAndroid Nov 02 '16 at 06:36
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:
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.
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
![](../../users/profiles/13616756.webp)
- 1
- 2
You need to go to the build.gradle(module)file and change the minSdkVersion to 16 and then rebuild the project in order for Android Studio to have context on the change.
-
1Welcome to SO. Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since Bryam Guzmán already posted that solution. If a previous answer was helpful to you, you should vote it up once you have enough reputation. – aUserHimself May 16 '21 at 10:20