1

Getting a call to require API level 11 (current min is 1) problem after when I have added fragment and drawer. Did everything couldn't find a single solution.

  1. Re-coded program but just when I add Fragment and Drawer
  2. Changed API level
  • 1
    Sounds like you set the min-API to 1, but you are implementing something that needs at least API 11. Change min-API to 11. Can you post your manifest file where you set the API and your build.gradle? OR look up [this](https://stackoverflow.com/questions/19465049/changing-api-level-android-studio) post, it might help you! – Strohhut Nov 28 '19 at 14:23
  • API min 1 is too low,change it in the gradle,you should atleast be using 15 if you need modern tricks,change it in Gradle( module app) set min sdk version to 15 – Hilary Mwape Nov 28 '19 at 14:33
  • around 0,6% of users or less [use android API](https://developer.android.com/about/dashboards) < 16. I'd suggest you to [raise minSdk](https://stackoverflow.com/questions/5427195/how-to-change-the-minsdkversion-of-a-project) level to 16 – isaaaaame Nov 28 '19 at 14:38
  • usually when you see this it means android studio is still indexing or building something or something similar (in other words it doesn't know the minSdk) and it will resolve itself – Tim Nov 28 '19 at 14:57
  • I guess there is a problem with gradle. Try to sync it successfully – Vlad Nov 29 '19 at 06:15
  • Thanks everybody, it helped a lot – Rohin Thakur Jul 20 '20 at 16:58

1 Answers1

0

As you said you are using fragments on your project, you need to declare the minimum sdk version at least to 11 since fragment minimum api requirement level is 11. If you really need to target less than 11 and use fragments, follow this tutorial.

Note: I suggest using at least a greater api level like 19 or 20 to get the advantage of the matured android ecosystem. The distribution of android indicates that under 11 is 0.3% and under 19 is 3.8 cumulatively. So no point in targeting <11 and putting the time on it. When the app grows, the problem might arise since modern libraries and animations are not support.

Fahry Mohammed
  • 453
  • 7
  • 14