How to deal with flutter Java/Kotlin

Viewed 638

I just noticed my flutter app, the android version is in Kotlin, that is the kotlin directory contains the MainActivity.kt

If I did this, it was a mistake because I don't know any Kotlin.

I would prefer my android app in Java, which is the MainActivity.java under the java folder.

How do I go about changing things so my android app is in Java?

1 Answers

Since the latest version of flutter the android project is created with kotlin by default. You can change this deleting the android folder and recreating it running the command below in the root of your project.

flutter create -a java .

Related