Saitmouk
Saitmouk

Reputation: 41

Flutter how to generate Java rather than Kotlin

I have already advance in my project, but I want to write android-specific code. It is generated in Kotlin by flutter, but I want Java. How can I change this?

Upvotes: 1

Views: 1619

Answers (2)

Saitmouk
Saitmouk

Reputation: 41

I finally recreated my project with the following command :

flutter create -i swift -a java app_name

Upvotes: 3

olibsjr
olibsjr

Reputation: 81

You can run the command flutter create . -i swift -a java in your project directory to convert your current app to swift and java. Make sure to back up your app first. It will also repair your project, recreating any files that are missing.

If this doesn't work, you might have to create a new project with the command flutter create -i objc -a java your_app_name_here, as mentionned above.

Upvotes: 0

Related Questions