Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Is it possible (convenient) to code an Android app using only Kotlin?
8 points by chatmasta on Feb 1, 2018 | hide | past | favorite | 6 comments
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?




You hate Java but you know JavaScript, then try React Native. You can create most of the applications using React Native which works for both IOS & Android. Or you can try Flutter which uses DartLang.


Yes. It is hundred percent possible to create an app using kotlin. You don't need to write java code to interface with libraries (though you can if you want to).

Since 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.


I've been programming for 14 years now (if you can count HTML as an 11 year old :p). I've reached professional proficiency in Python, JavaScript. I have minor experience (at least one project) in C, C++, PHP, Prolog. I'm also proficient with bash, SQL, etc... Point is, learning a new language is not a problem for me.

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.


Is your goal building an Android application or learning a new language?

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.


Good advice, thanks. I suppose the goal is to code an Android application but avoid (re)learning Java. I guess I was looking more for validation that this is possible without major headaches.


You can learn them simultaneously. Antonio Leiva has an amazing book on the subject. The kotlin and Android docs should suffice as the sdk methods will remain the same. And kotlin has a simple syntax. And you will have the benefit of Android studio and it's code completion.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: