Ask HN: Is it possible (convenient) to code an Android app using only Kotlin?
Is Kotlin ready for prime time? I’d like to learn android development, but I’ve always hated Java and strived to avoid it.
Is it possible (convenient, no major roadblocks) to create an Android app using only Kotlin? Or is it likely you will need to drop into java to interface with popular libraries?
How does Kotlin/Java compare to Swift/Objective-C?
6 comments
[ 4.9 ms ] story [ 25.3 ms ] threadSince both Java and Kotlin compile down to the JVM Bytecode, using Java libraries with kotlin won't be an issue.
Convenience might be an issue if you are starting new. Most of the turorials and the official documentation for android are written with Java in mind. There are good books and tutorials available for kotlin and they will only increase day by day. But you will have to work hard for the initial period.
That said, I have very little, basically no Java experience (used it 8 years ago in high school, and for a bit at an internship). I also have no Kotlin experience. So either way, I need to learn something if I want to develop natively for android (I'm interested in creating an app heavily dependent on system networking API's, so while I could use JS for the presentation layer, native code is a requirement at some point).
How would you recommend approaching this? Should I learn the basics of android programming with Java first, then move to Kotlin? Should I learn them simultaneously somehow? Any resources you can point me to?
Thanks for your time.
Instead of asking "Should I use Kotlin or Java to create an Android application?" ask yourself "Do I want to create an Android application using Kotlin or Java?"
You're going to get mixed answers from external forces because this is a mostly subjective question. People who used Java for 10 years will obviously recommend one over the other, while early Kotlin adopters will praise their own choice.
The biggest concern when choosing a language should be "Can I achieve the same results?" in this case is a yes, because you can always use both in the same project if you need to dive deep into some Android API.
Put 10-15 minutes into a simple Hello World in each one, and see which one is more fun and engaging for you to learn.