Pea*_*Gen 4 android ios dart flutter
我正在尝试创建一个新的 Flutter 项目。我试过 ,
\n1.flutter create
和
flutter create --org com.domain.appname
他们都返回了以下内容。
\nNo option specified for the output directory.\nCreate a new Flutter project.\n\nIf run on a project that already exists, this will repair the project,\nrecreating any files that are missing.\n\nGlobal options:\n-h, --help Print this usage information.\n-v, --verbose Noisy logging, including all shell commands\n executed.\n If used with "--help", shows hidden options. If used\n with "flutter doctor", shows additional diagnostic\n information. (Use "-vv" to force verbose logging in\n those cases.)\n-d, --device-id Target device id or name (prefixes allowed).\n --version Reports the version of this tool.\n --suppress-analytics Suppress analytics reporting when this command runs.\n\nUsage: flutter create <output directory>\n-h, --help Print this usage information.\n --[no-]pub Whether to run "flutter pub get" after the project\n has been created.\n (defaults to on)\n --[no-]offline When "flutter pub get" is run by the create\n command, this indicates whether to run it in\n offline mode or not. In offline mode, it will need\n to have all dependencies already available in the\n pub cache to succeed.\n --[no-]overwrite When performing operations, overwrite existing\n files.\n --description The description to use for your new Flutter\n project. This string ends up in the pubspec.yaml\n file.\n (defaults to "A new Flutter project.")\n --org The organization responsible for your new Flutter\n project, in reverse domain name notation. This\n string is used in Java package names and as prefix\n in the iOS bundle identifier.\n (defaults to "com.example")\n --project-name The project name for this new Flutter project. This\n must be a valid dart package name.\n-i, --ios-language The language to use for iOS-specific code, either\n ObjectiveC (legacy) or Swift (recommended).\n [objc, swift (default)]\n-a, --android-language The language to use for Android-specific code,\n either Java (legacy) or Kotlin (recommended).\n [java, kotlin (default)]\n --platforms The platforms supported by this project. Platform\n folders (e.g. android/) will be generated in the\n target project. This argument only works when\n "--template" is set to app or plugin. When adding\n platforms to a plugin project, the pubspec.yaml\n will be updated with the requested platform. Adding\n desktop platforms requires the corresponding\n desktop config setting to be enabled.\n [ios (default), android (default), windows\n (default), linux (default), macos (default), web\n (default)]\n-t, --template=<type> Specify the type of project to create.\n\n [app] (default) Generate a Flutter application.\n [module] Generate a project to add a Flutter module to an\n existing Android or iOS application.\n [package] Generate a shareable Flutter project containing\n only Dart code.\n [plugin] Generate a shareable Flutter project containing an\n API in Dart code with a platform-specific\n implementation for Android, for iOS code, or for\n both.\n\n-s, --sample=<id> Specifies the Flutter code sample to use as the\n "main.dart" for an application. Implies\n "--template=app". The value should be the sample ID\n of the desired sample from the API documentation\n website (http://docs.flutter.dev/). An example can\n be found at:\n https://api.flutter.dev/flutter/widgets/SingleChild\n ScrollView-class.html\n --list-samples=<path> Specifies a JSON output file for a listing of\n Flutter code samples that can be created with\n "--sample".\n\nRun "flutter help" to see global options.\n
Run Code Online (Sandbox Code Playgroud)\n下面是我的flutter doctor
输出。
Doctor summary (to see all details, run flutter doctor -v):\n[\xe2\x9c\x93] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-arm, locale\n en-LK)\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 30.0.3)\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS\n[\xe2\x9c\x93] Chrome - develop for the web\n[\xe2\x9c\x93] Android Studio (version 4.2)\n[\xe2\x9c\x93] VS Code (version 1.59.1)\n[\xe2\x9c\x93] Connected device (2 available)\n\n\xe2\x80\xa2 No issues found!\n
Run Code Online (Sandbox Code Playgroud)\n我正在使用 MacBook Pro M1 芯片笔记本电脑,这有帮助吗?
\n这里发生了什么?
\n我觉得我提出一个简单的问题是很愚蠢的,也许我只是长时间工作太累了。无论如何,我犯了一个错误,这就是答案。
flutter create --org com.domain appname
appname
注意和之间的空格com.domain