janavarro
janavarro

Reputation: 889

Should I upgrade targetSDK version?

I am working with a legacy application that has tagetSDK set to 18. This application will be used in api 29 devices. When I update the target sdk it crashes more often and has more bugs overall.

Should I upgrade and fix all these bugs?, or stay in targetSDK 18, which can be run in api 29 devices, but with a legacy app warning. What can happen if I don't update the target sdk?

Upvotes: 0

Views: 663

Answers (2)

Daniel V
Daniel V

Reputation: 57

I think upgrading the target sdk does not cause any crash, the problem is you also modify the compile SDK. Now ideally these 2 numbers should match and Android Studio will keep warning you, but if you ignore it I think you will be able to compile and publish your app. At least I did it many times when i only realised during upload that the target SDK shall be higher. However I generally only "cheated" 1-2 versions up and now 10 :)

Upvotes: 0

Bagoly Sz.
Bagoly Sz.

Reputation: 166

In case you plan to publish/update the app on the Google Play Store there is a very good reason to upgrade the target API level, as otherwise Play Store will prevent you from publishing/updating the app: https://support.google.com/googleplay/android-developer/answer/9859152?visit_id=637425101662939933-377869824&rd=1#targetsdk

Upvotes: 1

Related Questions