0
Is It Safe to Convert Java Code to Kotlin Code
Is it a good idea to convert an android studio project from Java to Kotlin? By just converting the code inside java activity classes to Kotlin? Or will there be any behind the scene java code that could cause problems now or late? ?? Or is it better to create a whole new project from scratch for Kotlin?
3 Answers
+ 7
I converted a few thousand lines and spent an hour fixing compile errors (using Intellij.) Mostly due to the differences in classes between the two languages. Once fixed, it ran perfectly. However, it would have taken me much longer recoding in Kotlin myself.
+ 3
If you know kotlin then use kotlin rather than using java but you still have to use some java class in kotlin.
+ 2
It depends I mean you still have to fix some code. By your own but yes it is worth but it all depends