In this post I want to show how to start an android project with some kotlin classes:
Start android studio and install the kotlin plugin: go to “search everywhere” and write plugin. In Plugins select kotlin and install it.
After this, create a new Android project and then, into search everywhere, type Configure kotlin and select Configure kotlin in project. This operation modify your build.grandle and add some rows:
After this operation it’s possible to convert java code into kotlin code, so it’s possible to convert an activity written in java, into activity written in kotlin: Select the activity to convert and then select “Convert java file to kotlin file” from Code menu
Now we can start to write our kotlin code in this android project.