Search code examples
androidsdkandroid-api-levels

Cannot select desired programming SDK platform in Android Studio


Well, I am trying to develop an APP for my Smartphone Samsung Galaxy Ace, which contains android 2.3.6 (Gingerbread). The problem is that I can't select a lower API to develop, as shown in the picture:

I also tried downloading the API I needed from SDK Manager

I've also seen some people changing SDK version from activity_main.xml, in the design menu, but as the picture shows, there aren't any other options available:

I tried editing build.gradle(Module:app) But it keeps giving me errors, I used tools:overrideLibrary, but it gives me more errors with more libraries to override

Please, let me know if there's a way to choose API level 9 (in my case) instead of choosing a higher API


Solution

  • Create your app with the android 4.0 SDK. Once you have done that, go to your build.gradle(Module: app) and change the minSdkVersion to whatever you want. But be sure not to use api features that are not supported in android 2.3.6, refer to this image.build.gradle(Module: app) You also need to install the Sdk for android 2.3.