Home > front end >  Rewriting android java project in kotlin language
Rewriting android java project in kotlin language

Time:10-06

I have some concern regarding the creation of existing android project written in Java language to kotlin language:

  1. Can I create it from scratch.
  2. Can I use same package name with same keystore and play console account.
  3. Can I use same firebase config file for using firebase services.

I am asking all this because when I was recreating the project in debug mode it say uninstall the previous version to continue.

Thanks.

CodePudding user response:

1)Yes, but you don't need to. Kotlin code can call java code, and java code can call Kotlin code. So you can convert 1 file or 1 part of your app at a time.

2)Yes. In fact I'd suggest it, unless you want to lose all your old users. The play store doesn't care if the language changes.

3)Yes, none of those services care about the language the app is written in.

CodePudding user response:

A brief answer to all of your questions is "yes, you can. Absolutely!". And for the configurations and stuff, Android Studio itself can handle it for you. Also, if you have already had a project, so you just don't need to re-create it from scratch in order to use Kotlin. You can just use a feature that Kotlin already has, which is interoperability (in this case, with JVM libraries or frameworks). So you can call Kotlin code from Java (in your current project) without an issue.

  • Related