'Will kotlin knowledge of android 12 be useless when android 13 arrives? [closed]

I think I am not understanding how the programming knowledge of Android Studio works. I mean, I have seen many courses on the internet that are focused in a certain version of Android Studio. So if I learn Kotlin of android 10 will be useless beause now only Kotilin of android 12 is usefull? Will i have to learn a new kotlin lenguage everytime a new version of android is comming? I am studying the programming language of "c" and it doesn´t matter what version you are using that everything you learned of "c" will be useful for any period of time. But I have seen that in kotlin is different,so, does the programming language of Kotlin change depending on the version of android that you are working on? What is the difference between working on Kotlin android version 11 that Kotlin android version 12 on Android Studio? Thanks



Solution 1:[1]

Old, abandoned Android apps generally work perfectly fine without modifications on newer devices - I still use plenty of such apps to this day.

However, if you were the developer of such an app, and you wanted to, say, push a small update to fix one minor thing, you would be forced to update your app to meet the standards of current Android versions first, or otherwise your update wouldn't be accepted on Google Play.

Example: in the past apps used to ask for all the permissions at once before installing, and while you probably can still find such apps in the Play Store, you wouldn't be able to publish such an app nowadays.

Instead, you would need to adapt your hypothetical old app to use this new pattern of asking for permissions right before they are needed first.


The Kotlin programming language is the same Kotlin programming language, there are no differences here between Android versions. New Kotlin releases generally only add new language features, they don't delete anything that matters, there is no need for you to worry about this.


For each Android app you make you choose a target Android version and minimum Android version (you can change them later).

Target version

The target version should generally be the current most up-to-date Android version. That is the version of Android that you designed your app in mind with. You should only later increase this number after you learn what the new guidelines, standards, features, etc. are in the new Android version - you will often need to change something in your app when you decide to "upgrade".

Minimum version

The minimum version is the oldest version that you want to have to keep in mind.

I don't really have good examples at hand here, but imagine support for flashlights was added in Android 5. So if set your minimum version to, say, Android 3, you would need to add a condition if your code to define what happens when the user is on Android 3 or 4 that doesn't have the support for flashlights. You would need to display a message to them for example, or make the your flashlight button grayed out and unclickable.

On the other hand, you could just set the minimum version to Android 5, and then you wouldn't have to write this code, because you could just assume that all devices that will be able to run your app know what a flashlight is. So that's less hassle for you, but it also means that less devices will be able to use your app.

Solution 2:[2]

No it won't be useless. You need to distinguish between the programming language Kotlin and the Android Framework and its APIs.

If a new Android version comes out, it doesn't mean we start writing apps from tabula rasa.

Every year, with a new Android version, Google introduces a few changes to how things work or extend the capabilities. For us as Android developers that means that we might need to consider new restrictions to permission management or things like that.

To summarize: The Android OS version has nothing to do with the programming language Kotlin itself. You are programming against the Android API version using Kotlin. You don't need to learn everything from the beginning when the next Android version comes out.

Solution 3:[3]

Changing Android versions means improving Android phones operation system with new features. It does not have any kind of impact on Kotlin or Java language. You will use same Kotlin for all Android versions.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 J. Hegg
Solution 3 Jakhongir