I've an existing Java project, I am trying to add a Kotlin activity but it's not listed in java files in android studio.
Inputs: kotlin files are added to main folder like this:
Gradle project is updated like this:
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0'
Gradle app level is updated like this:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
finally in android studio, can't find Kotlin activity. only java files are listed.
did I miss any configuration?
CodePudding user response:
Don't need to add another package in this case, just add another activity with Kotlin language like this (source language should be Kotlin):