Downgrade Android App Sdk

1.7k views Asked by At

So I have a phone with Lollipop (5.0) and want to make my app compatible with phones that have KitKat(4.4). Min Sdk Version: 19. Target Sdk version: API 21 (lollipop). Build tools version: 21.1.2. Compile Sdk version: API 21.

My question is:

What do I need to change so my app won't be affected? I have downloaded everything about API 19 in Sdk manager, thanks for your help!

1

There are 1 answers

1
Chris Stillwell On

In your android manifest set your uses-sdk to the following values:

<uses-sdk
        android:minSdkVersion="19"
        android:targetSdkVersion="21" />

So long as you aren't using any sdk 21 only functions or classes you should be good. Running a clean will show you warnings for any functions or class you are using that aren't supported by your min sdk