How to Use Kotlin in an Existing Android App?

前端 未结 9 1052
清酒与你
清酒与你 2021-01-05 03:18

I have an Android App developed using Java. I now want to start using Kotlin for the same app. Is it possible to use Kotlin and Java side-by-side in an existing app?

9条回答
  •  一个人的身影
    2021-01-05 04:00

    simplest way to do this is :

    1. right click on app folder
    2. select new
    3. kotlin file/class
    4. any directory with any name "KotlinTest"
    5. it will prompt you to configure
    6. select appropriate module or all modules(if you are using wear also in your project)
    7. this will start automatic installation
    8. delete KotlinTest class

提交回复
热议问题