Flutter web create issue in existing flutter app
Solution 1
I am getting this issue because of creating flutter web apps from existing flutter Android and iOS codebase,for this structure flutter web is not supported... We have to create a new flutter project for web
Solution 2
You can use this command
flutter create --org package_name .
Solution 3
this worked for me. you need to specify output directory too. for the same flutterapp directory, use ./ hope this helps u :)
flutter create --org flutterappname ./
Solution 4
You can add the app to the existing flutter project as well. Here are some steps that I followed
1: Create a new branch to not mess things up in existing branch if you are starting with flutter web for the first time.
2: flutter channel master
3: flutter config --enable-web
: Now you may or may not see the new Dart SDK being downloaded.
4: flutter create --org package_name .
: This will add the web files in your project.
5: flutter devices
: You must see chrome listed now.
6: flutter run -d chrome
: If you see something like project not configured for the web then try step 3 again and reopen your editor.
Solution 5
You jus add following line
flutter create --org FLUTTER_APP .
Comments
-
Rahul Devanavar over 1 year
I already have the flutter app, now I am adding support to flutter Web following this doc. I am getting the error on
flutter create .
Ambiguous organization in existing files: {com.app.android.fluttermodule,com.app.android.flutterModule}. The --org command line argument must be specified to recreate project.
I have mentioned
pubsec.yml
module: androidPackage: com.app.android.fluttermodule iosBundleIdentifier: com.app.android.flutterModule
-
Jigar Fumakiya over 4 yearscheck android & IOS package name
-
Rahul Devanavar over 4 yearsIf I trying to change that it's not working
-
Jigar Fumakiya over 4 yearschange android package name from manifest and IOS package name from Xcode
-
Al Mamun about 3 yearsI just change my ios bunddle id same as android package name and it works
-
-
Abdullah Khan almost 4 yearsThen what the doc mean here flutter.dev/docs/get-started/…
-
tensor almost 4 yearsI added support to existing project, please have a look at my answer and try that out :)
-
Saw Thinkar Nay Htoo over 3 yearsWhat does the above command do? Why doesn't
flutter create .
work? -
Yogesh Patel over 3 yearsHello Harshit, I follow your steps facing one error please help! No devices found with name or id matching 'chrome'
-
Jai Techie almost 3 yearshello, flutter create --org package_name . in this step if i entered correct package name also is not a valid Dart package name error showing.
-
Abdulrahman Alhayek over 2 yearsWhen I use this command with an existing project I get the following error: "App_Flutter" is not a valid Dart package name. Please note I'm trying to add a macOS version @SawThinkarNayHtoo