[英]Ambiguous organization in existing files:{ .... }. The --org command line argument must be specified to recreate project
While trying to run my existing flutter app on windows, got the following exeption - "Exception: No Windows desktop project configured. See https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-應用程序了解如何將 Windows 支持添加到項目”。 在我輸入給定的 url 並嘗試運行命令后:“flutter create --platforms=window,macos,linux。” 它說:“現有文件中的模糊組織:{il.co.project.pos, com.example}。必須指定 --org 命令行參數才能重新創建項目。”
選擇 package 名稱:
package_name = com.xxx
flutter create --org com.xxx .
運行flutter create --org your_package_name project_name
您可以在項目根文件夾中嘗試此命令
flutter create --platforms=windows --org=com.example.org_name .
您可能重新使用新項目的代碼並更改了 package 名稱,這就是為什么它與您的項目使用 flutter create --org package_name 沖突的原因。
對於那些想知道的人,您還會通過使用破折號的父目錄名稱來獲得此錯誤,例如: this-will-fail
應該是: thiswillfail
運行后: flutter create --org=com.project.web.
if you run inside terminal for web if you want for iOS then simple change web on iOS like flutter create --platforms=web
. 如果然后在現有文件中顯示此類錯誤模糊組織:{com.ecobuy,com.eco_buy}。 必須指定--org
命令行參數才能重新創建項目。 然后只需在下面寫下flutter create --platforms=web --org=com.example.org_name
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.