Experiment with Kotlin for Android

First Impressions...
...Not going to be Good

I'm experimenting with developing an App on Android and the latest 1.5 release of Kotlin just arrived. So my first impressions are being developed.

I first downloaded the 4.2 (release) of Android Studio - before the Kotlin 1.5 dropped. It was not quite a smooth install. I don't remember what might have gone wrong - but it would not compile and run the first simple App code I got off of GitHub. And wanting to use the Jetpack framework for UI the instructions tend to indicate I must have a Canary build 15 of Studo... so I got the Preview now with new year based version numbers 2020.3.1 (it's 2021 but who's counting).The install of course then goes out to the internet to download more stuff... tons of Java packages for somewhere - OK I'm game. I decided to use the Google sponsored Kotlin Bootcamp for Programmers - Language fundamentals Free Course. It starts with the classic Hello World!

One of my first OMG moments was when the course covers the folder structure and where various files live within the folder structure. For unstated reasons (except - this is the WAY) the Kotlin files are found in one of the java folders - WEIRD. Openning the MainActivity Kotlin file and searching for the string "Hello, World!" ... it's not here. The text is found in an XML (which I thought was used for configuration) in the res folder inside layout folder with a file name of activity_main.xml. With in the MainActivity there is an identifier R.layout.activity_main. And like classic programmers from 1970s the "es" of the folder name "res" was way too much typing. No one in the training video bothered to tell me this... I pieced it together when writing my first impressions.

Connecting concepts together is the job of the programmer. Short cuts in naming are not good for beginners. So if one is keeping score - we haven't compiled our first bit of Kotlin and we already have obfuscated two folder names (java -> kotlin; R -> res).

Compiling and Running the example is straight forward - the simulator starts up and after a boot up runs the Hello, World! example. So I change the text - not in the Kotlin code but down in the XML layout resource. Stop and Rerun the simulator and ... hmmm ... not the text I typed in. Looking around did I do the right XML property? What could be wrong. After lots of pondering with no luck. I stopped and restarted the simulator - Hello, Android Dev! Well that's WEIRD. Let's run a little test... YEAP it takes 2 consetive runs to get the code deployed and running on the simulator. I'm sure the tutorial will cover this at some future point. YUCK!

Some questions - please let me know the answers...

I'm wondering how I know what versions of the Android world of phones this example App would run upon?

I'm confusing the names of various frameworks within the Kotlin world - there is Kotlin Multiplatform Mobile (KMM) and then there is Jetpack. It seems that Jetpack has a much better development environment as it is declaritive much like SwiftUI and therefore does away with the XML layout resources. This also looks like it would be much easier for a SwiftUI developer to be productive faster.