Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter not creating Java Classes only Kotlin Instead

I am creating a simple flutter project with latest stable version of flutter. The project, I am creating is without any kotlin support because I want to use java but it is still creating only Kotlin MainActivity class by default. is there a way to use java?

like image 856
adnan ijaz Avatar asked Oct 19 '19 11:10

adnan ijaz


1 Answers

If you are creating a new flutter app using the latest stable version, the default now is Kotlin for android and Swift for IOS. You can read more here: https://github.com/flutter/flutter/issues/21190

If you want to create a new app using Java for Android and Objective-C for IOS use the following command:

flutter create -i objc -a java new_app

And if you have an existing app

flutter create -i objc -a java .
like image 116
digitaljoni Avatar answered Oct 15 '22 23:10

digitaljoni