Reputation: 35
As always, the newbies are here to ask those dumb question you guys hate so much. As such, please excuse the following question:
Does Android studio allow you to use Java and Kotlin activities interchangeably? That is in the same project. Well, I don't want to convert the code fekm Java to Kotlin, I want it to remain in Java, while on the other hand, some activities will be in Kotlin of course.
Reason, I ask this is because I tried to do this but I had my app crashing as it switched from a Kotlin to a Java activity. So, before I proceed with it, I thought why not, maybe you gurus can shed some light and there might be some code error instead. Be gentle, I'm still a newbie.
Thank you in advance.
Upvotes: 0
Views: 310
Reputation: 263
As matter of fact you can. I'm a android app developer and I'm using both the languages at same time. Also, when JetBrains launched kotlin that time they said and showed both language classes can interact together in single project.
You can goto this link you will get a better idea how to do this.
Upvotes: 2