If I make my application at API level 21 (5.0), will it work with a newer version of Android?

I just started using Android 2 weeks ago.

I have successfully made my first application with API level 21 (5.1 Lollipop). I have an android phone also 5.1 Lollipop.

I wonder if my app will work with all newer Android versions like 6.0 Marshmallow or 7.0 Nougat? Or do I need to provide updates?

Thank you.

+3


source to share


1 answer


Yes, it will work in newer versions if you don't have maxSdkVersion

it set to 21

You will find up to three attributes in your application manifest:

android:minSdkVersion

android:targetSdkVersion

android:maxSdkVersion



If your max is set to 21 it will not work with newer versions. You may not even have the maximum set.

Your target audience is probably set to 21, or your minimum set to 21, or both ...

You can read more about <uses-sdk>

here

It should be noted that 4.4 kitkat still has 17% of the API distribution, so you can set minSdkVersion to 19. You can find the weekly updated distribution here

0


source







All Articles