host.docker.internalというドメインが初見だったので調べてみると、Docker Desktop for xxで利用できる、コンテナから参照する場合のhostを指すドメインだということです。わたしの環境はDocker Desktop for Macを利用しているので利用できるはずです。
$ git diff Gemfile diff --git a/api/Gemfile b/api/Gemfile --- a/api/Gemfile +++ b/api/Gemfile @@ -76,6 +76,7 @@ group :test do gem "capybara" gem "selenium-webdriver" gem "webdrivers" + gem "committee-rails" end
1 2 3 4 5 6 7 8 9 10 11
$ docker-compose run --rm api ./bin/bundle install Using devise-i18n 1.10.2 Using devise_token_auth 1.2.1 Installing openapi_parser 0.15.0 Installing json_schema 0.21.0 Fetching committee 4.4.0 Installing committee 4.4.0 Fetching committee-rails 0.6.1 Installing committee-rails 0.6.1 Bundle complete! 29 Gemfile dependencies, 114 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed.
RSpec.describe "API::Auth::RegistrationsController", type: :request do describe "POST /api/v1/auth" do it "returns 200" do post "/api/v1/auth", params: { email: "example@example.com" } assert_response_schema_confirm(200) end
it "returns 422" do post "/api/v1/auth", params: { password: "password" } assert_response_schema_confirm(422) end end end
specの実行
では実行します。
1 2 3 4 5 6 7 8 9 10
$ docker-compose run --rm api ./bin/rspec spec/api/v1/auth/registrations_controller_spec.rb
(省略)
Failures: 1) API::Auth::RegistrationsController POST /api/v1/auth return 200 Failure/Error: <p><%= link_to t('.confirm_account_link'), confirmation_url(@resource, {confirmation_token: @token, config: message['client-config'].to_s, redirect_url: message['redirect-url']}).html_safe %></p> ActionView::Template::Error: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
$ docker-compose run --rm api ./bin/rspec spec/api/v1/auth/registrations_controller_spec.rb
(省略)
API::Auth::RegistrationsController POST /api/v1/auth [DEPRECATION] Committee: please set query_hash_key = rack.request.query_hash because we'll change default value in next major version. [DEPRECATION] Committee: please set parse_response_by_content_type = false because we'll change default value in next major version.
$ flutter pub add shared_preferences ╔════════════════════════════════════════════════════════════════════════════╗ ║ A new version of Flutter is available! ║ ║ ║ ║ To update to the latest version, run "flutter upgrade". ║ ╚════════════════════════════════════════════════════════════════════════════╝
$ git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: pubspec.lock modified: pubspec.yaml
$ git diff pubspec.yaml diff --git a/pubspec.yaml b/pubspec.yaml index 037db97..2c583dc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -34,6 +34,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 + shared_preferences: ^2.0.13 dev_dependencies: flutter_test:
$ flutter upgrade Upgrading Flutter to 2.10.4 from 2.10.3 in /Users/user/flutter... Downloading Dart SDK from Flutter engine 57d3bac3dd5cb5b0e464ab70e7bc8a0d8cf083ab... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
$ flutter run Launching lib/main.dart on iPhone 13 in debug mode... Running Xcode build... └─Compiling, linking and signing... 4.3s Xcode build done. 12.6s Syncing files to device iPhone 13... 90ms
Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device).
💪 Running with sound null safety 💪
An Observatory debugger and profiler on iPhone 13 is available at: http://127.0.0.1:57320/EBquF8FZZxI=/ The Flutter DevTools debugger and profiler on iPhone 13 is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:57320/EBquF8FZZxI=/
$ ~/Library/Android/sdk/emulator/emulator -avd Pixel_5_API_30 INFO | Android emulator version 31.2.8.0 (build_id 8143646) (CL:N/A) WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator. INFO | configAndStartRenderer: setting vsync to 60 hz WARNING | cannot add library /Users/user/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed INFO | added library /Users/user/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib INFO | Started GRPC server at 127.0.0.1:8554, security: Local INFO | Advertising in: /Users/user/Library/Caches/TemporaryItems/avd/running/pid_77656.ini INFO | Your emulator is out of date, please update by launching Android Studio: - Start Android Studio - Select menu "Tools > Android > SDK Manager" - Click "SDK Tools" tab - Check "Android Emulator" checkbox - Click "OK"
$ flutter run Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering". Launching lib/main.dart on Android SDK built for x86 in debug mode... Checking the license for package Android SDK Tools in /Users/user/Library/Android/sdk/licenses License for package Android SDK Tools accepted. Preparing "Install Android SDK Tools (revision: 26.1.1)". "Install Android SDK Tools (revision: 26.1.1)" ready. Installing Android SDK Tools in /Users/user/Library/Android/sdk/tools "Install Android SDK Tools (revision: 26.1.1)" complete. "Install Android SDK Tools (revision: 26.1.1)" finished. Checking the license for package Android SDK Build-Tools 29.0.2 in /Users/user/Library/Android/sdk/licenses License for package Android SDK Build-Tools 29.0.2 accepted. Preparing "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)". "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" ready. Installing Android SDK Build-Tools 29.0.2 in /Users/user/Library/Android/sdk/build-tools/29.0.2 "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" complete. "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" finished. Checking the license for package Android SDK Platform 31 in /Users/user/Library/Android/sdk/licenses License for package Android SDK Platform 31 accepted. Preparing "Install Android SDK Platform 31 (revision: 1)". "Install Android SDK Platform 31 (revision: 1)" ready. Installing Android SDK Platform 31 in /Users/user/Library/Android/sdk/platforms/android-31 "Install Android SDK Platform 31 (revision: 1)" complete. "Install Android SDK Platform 31 (revision: 1)" finished. Running Gradle task 'assembleDebug'... 157.2s ✓ Built build/app/outputs/flutter-apk/app-debug.apk. Installing build/app/outputs/flutter-apk/app.apk... 1,035ms Syncing files to device Android SDK built for x86... 116ms
Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device).
💪 Running with sound null safety 💪
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:58754/V-rtq-7NtAg=/ The Flutter DevTools debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:58754/V-rtq-7NtAg=/
$ flutter create -i swift -a kotlin --androidx --org org.book-reviews --description 'flutter sample app' flutter_sample_app Could not find an option named "androidx".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
$ flutter upgrade Flutter is already up to date on channel stable Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 7e9793dee1 (2 weeks ago) • 2022-03-02 11:23:12 -0600 Engine • revision bd539267b4 Tools • Dart 2.16.1 • DevTools 2.9.2
もともと最新だったようです。再度実行してみます。
1 2 3 4
$ flutter create -i swift -a kotlin --androidx --org org.book-reviews --description 'flutter sample app' flutter_sample_app Could not find an option named "androidx".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
If run on a project that already exists, this will repair the project, recreating any files that are missing.
Global options: -h, --help Print this usage information. -v, --verbose Noisy logging, including all shell commands executed. If used with "--help", shows hidden options. If used with "flutter doctor", shows additional diagnostic information. (Use "-vv" to force verbose logging in those cases.) -d, --device-id Target device id or name (prefixes allowed). --version Reports the version of this tool. --suppress-analytics Suppress analytics reporting when this command runs.
Usage: flutter create <output directory> -h, --help Print this usage information. --[no-]pub Whether to run "flutter pub get" after the project has been created. (defaults to on) --[no-]offline When "flutter pub get" is run by the create command, this indicates whether to run it in offline mode or not. In offline mode, it will need to have all dependencies already available in the pub cache to succeed. --[no-]overwrite When performing operations, overwrite existing files. --description The description to use for your new Flutter project. This string ends up in the pubspec.yaml file. (defaults to "A new Flutter project.") --org The organization responsible for your new Flutter project, in reverse domain name notation. This string is used in Java package names and as prefix in the iOS bundle identifier. (defaults to "com.example") --project-name The project name for this new Flutter project. This must be a valid dart package name. -i, --ios-language The language to use for iOS-specific code, either ObjectiveC (legacy) or Swift (recommended). [objc, swift (default)] -a, --android-language The language to use for Android-specific code, either Java (legacy) or Kotlin (recommended). [java, kotlin (default)] --platforms The platforms supported by this project. Platform folders (e.g. android/) will be generated in the target project. This argument only works when "--template" is set to app or plugin. When adding platforms to a plugin project, the pubspec.yaml will be updated with the requested platform. Adding desktop platforms requires the corresponding desktop config setting to be enabled. [ios (default), android (default), windows (default), linux (default), macos (default), web (default)] -t, --template=<type> Specify the type of project to create.
[app] (default) Generate a Flutter application. [module] Generate a project to add a Flutter module to an existing Android or iOS application. [package] Generate a shareable Flutter project containing modular Dart code. [plugin] Generate a shareable Flutter project containing an API in Dart code with a platform-specific implementation for Android, for iOS code, or for both. [skeleton] Generate a List View / Detail View Flutter application that follows community best practices.
-s, --sample=<id> Specifies the Flutter code sample to use as the "main.dart" for an application. Implies "--template=app". The value should be the sample ID of the desired sample from the API documentation website (http://docs.flutter.dev/). An example can be found at: https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html --list-samples=<path> Specifies a JSON output file for a listing of Flutter code samples that can be created with "--sample".
Run "flutter help" to see global options.
見たところ、--androidxというオプションはなさそうなので、なしで実行してみます。
1 2 3 4 5 6 7 8 9 10 11 12
$ flutter create -i swift -a kotlin --org org.book-reviews --description 'flutter sample app' flutter_sample_app Creating project flutter_sample_app... Running "flutter pub get" in flutter_sample_app... 2,764ms Wrote 96 files.
All done! In order to run your application, type:
$ cd flutter_sample_app $ flutter run
Your application code is in flutter_sample_app/lib/main.dart.
作成できました!
アプリケーションの起動
プロジェクト作成後のメッセージにアプリケーションの起動方法が書かれていたので早速実行してみます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
$ cd flutter_sample_app $ flutter run Launching lib/main.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome... 15.4s This app is linked to the debug service: ws://127.0.0.1:52600/qyihwl33cdE=/ws Debug service listening on ws://127.0.0.1:52600/qyihwl33cdE=/ws
💪 Running with sound null safety 💪
🔥 To hot restart changes while running, press "r" or "R". For a more detailed help message, press "h". To quit, press "q".
An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:52600/qyihwl33cdE= A message on the flutter/keyevent channel was discarded before it could be handled. This happens when a plugin sends messages to the framework side before the framework has had an opportunity to register a listener. See the ChannelBuffers API documentation for details on how to configure the channel to expect more messages, or to expect messages to get discarded: https://api.flutter.dev/flutter/dart-ui/ChannelBuffers-class.html
Chromeが起動し、Flutter Demo Home Pageが表示されました。右下の+ボタンをクリックすると、真ん中に表示されている数字が増えていきます。
$ ./bin/flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.3, on macOS 11.6 20G165 darwin-x64, locale ja-JP) [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use `flutter config --android-sdk` to update to that location.
[✗] Xcode - develop for iOS and macOS ✗ Xcode installation is incomplete; a full installation is necessary for iOS development. Download at: https://developer.apple.com/xcode/download/ Or install Xcode via the App Store. Once installed, run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xcodebuild -runFirstLaunch ✗ CocoaPods not installed. CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. [✓] Chrome - develop for the web [!] Android Studio (not installed) [✓] VS Code (version 1.65.0) [!] Proxy Configuration ! NO_PROXY does not contain 127.0.0.1 ! NO_PROXY does not contain ::1 [✓] Connected device (1 available) [✓] HTTP Host Availability
By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree
You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf
状況確認
Xcodeがインストールできたので、再度flutter doctorで確認します。
1 2 3 4 5 6 7 8 9 10 11
$ flutter doctor ...(省略)... [!] Xcode - develop for iOS and macOS (Xcode 13.2.1) ✗ CocoaPods not installed. CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. ...(省略)...
冒頭にYou can use a Ruby Version manager, however we recommend that you use the standard Ruby available on macOS unless you know what you're doing.とあるので、グローバルにインストールされているRubyを利用しようと思います。
1 2 3 4 5 6 7 8
$ which ruby /Users/user/.anyenv/envs/rbenv/shims/ruby $ ruby -v ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20] $ rbenv versions * system 2.4.10 3.1.0
$ sudo /usr/bin/gem install cocoapods Password: Fetching concurrent-ruby-1.1.9.gem Fetching tzinfo-2.0.4.gem Fetching zeitwerk-2.5.4.gem Fetching activesupport-6.1.5.gem Fetching fuzzy_match-2.0.4.gem Fetching i18n-1.10.0.gem Fetching nap-1.1.0.gem Fetching httpclient-2.8.3.gem Fetching algoliasearch-1.27.5.gem Fetching ffi-1.15.5.gem Fetching ethon-0.15.0.gem Fetching typhoeus-1.4.0.gem Fetching netrc-0.11.0.gem Fetching public_suffix-4.0.6.gem Fetching addressable-2.8.0.gem Fetching cocoapods-core-1.11.3.gem Fetching claide-1.1.0.gem Fetching cocoapods-deintegrate-1.0.5.gem Fetching cocoapods-downloader-1.5.1.gem Fetching cocoapods-plugins-1.0.0.gem Fetching cocoapods-search-1.0.1.gem Fetching cocoapods-trunk-1.6.0.gem Fetching cocoapods-try-1.2.0.gem Fetching molinillo-0.8.0.gem Fetching atomos-0.1.3.gem Fetching colored2-3.1.2.gem Fetching nanaimo-0.3.0.gem Fetching rexml-3.2.5.gem Fetching xcodeproj-1.21.0.gem Fetching escape-0.0.4.gem Fetching fourflusher-2.3.1.gem Fetching gh_inspector-1.1.3.gem Fetching ruby-macho-2.5.1.gem Fetching cocoapods-1.11.3.gem Successfully installed concurrent-ruby-1.1.9 Successfully installed i18n-1.10.0 Successfully installed tzinfo-2.0.4 Successfully installed zeitwerk-2.5.4 Successfully installed activesupport-6.1.5 Successfully installed nap-1.1.0 Successfully installed fuzzy_match-2.0.4 Successfully installed httpclient-2.8.3 A new major version is available for Algolia! Please now use the https://rubygems.org/gems/algolia gem to get the latest features. Successfully installed algoliasearch-1.27.5 Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20220317-44199-1ctmdly.rb extconf.rb checking for ffi.h... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME) --with-ffi_c-dir --without-ffi_c-dir --with-ffi_c-include --without-ffi_c-include=${ffi_c-dir}/include --with-ffi_c-lib --without-ffi_c-lib=${ffi_c-dir}/lib --enable-system-libffi --disable-system-libffi --with-libffi-config --without-libffi-config --with-pkg-config --without-pkg-config /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `block in try_compile' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in `with_werror' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in `try_compile' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in `block in have_header' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in `open' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in `postpone' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in `have_header' from extconf.rb:10:in `system_libffi_usable?' from extconf.rb:42:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5 for inspection. Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.15.5/gem_make.out
$ brew install libffi Running `brew update --preinstall`... ...(省略)... ==> Downloading https://ghcr.io/v2/homebrew/core/libffi/manifests/3.4.2 ######################################################################## 100.0% ==> Downloading https://ghcr.io/v2/homebrew/core/libffi/blobs/sha256:a461f6ad21a23a725691385dbbec3eff958cf61d5282e84dc3f0483e307e1875 ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:a461f6ad21a23a725691385dbbec3eff958cf61d5282e84dc3f0483e307e1875?se=202 ######################################################################## 100.0% ==> Pouring libffi--3.4.2.big_sur.bottle.tar.gz ==> Caveats libffi is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.
For compilers to find libffi you may need to set: export LDFLAGS="-L/usr/local/opt/libffi/lib" export CPPFLAGS="-I/usr/local/opt/libffi/include"
==> Summary 🍺 /usr/local/Cellar/libffi/3.4.2: 17 files, 599.8KB ==> `brew cleanup` has not been run in the last 30 days, running now... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). Removing: /Users/user/Library/Caches/Homebrew/icu4c--69.1... (27.2MB) Removing: /Users/user/Library/Caches/Homebrew/nkf--2.1.5... (167KB) Removing: /Users/user/Library/Caches/Homebrew/nkf_bottle_manifest--2.1.5... (7.9KB) Removing: /Users/user/Library/Logs/Homebrew/telnet... (64B)
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby $ sudo ln -sf ../../../../Headers/ruby/config.h
すると、内容は変わったのですが、いまだにエラーは出ます。
1 2 3 4 5 6 7 8
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/ext/ffi_c make "DESTDIR=" make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin20/ruby/config.h', needed by `AbstractMemory.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5 for inspection. Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.15.5/gem_make.out
$ sudo gem install cocoapods Password: Building native extensions. This could take a while... Successfully installed ffi-1.15.5 Successfully installed ethon-0.15.0 Successfully installed typhoeus-1.4.0 Successfully installed netrc-0.11.0 Successfully installed public_suffix-4.0.6 Successfully installed addressable-2.8.0 Successfully installed cocoapods-core-1.11.3 Successfully installed claide-1.1.0 Successfully installed cocoapods-deintegrate-1.0.5 Successfully installed cocoapods-downloader-1.5.1 Successfully installed cocoapods-plugins-1.0.0 Successfully installed cocoapods-search-1.0.1 Successfully installed cocoapods-trunk-1.6.0 Successfully installed cocoapods-try-1.2.0 Successfully installed molinillo-0.8.0 Successfully installed atomos-0.1.3 Successfully installed colored2-3.1.2 Successfully installed nanaimo-0.3.0 Successfully installed rexml-3.2.5 Successfully installed xcodeproj-1.21.0 Successfully installed escape-0.0.4 Successfully installed fourflusher-2.3.1 Successfully installed gh_inspector-1.1.3 Successfully installed ruby-macho-2.5.1 Successfully installed cocoapods-1.11.3 Parsing documentation for ffi-1.15.5 Installing ri documentation for ffi-1.15.5 Parsing documentation for ethon-0.15.0 Installing ri documentation for ethon-0.15.0 Parsing documentation for typhoeus-1.4.0 Installing ri documentation for typhoeus-1.4.0 Parsing documentation for netrc-0.11.0 Installing ri documentation for netrc-0.11.0 Parsing documentation for public_suffix-4.0.6 Installing ri documentation for public_suffix-4.0.6 Parsing documentation for addressable-2.8.0 Installing ri documentation for addressable-2.8.0 Parsing documentation for cocoapods-core-1.11.3 Installing ri documentation for cocoapods-core-1.11.3 Parsing documentation for claide-1.1.0 Installing ri documentation for claide-1.1.0 Parsing documentation for cocoapods-deintegrate-1.0.5 Installing ri documentation for cocoapods-deintegrate-1.0.5 Parsing documentation for cocoapods-downloader-1.5.1 Installing ri documentation for cocoapods-downloader-1.5.1 Parsing documentation for cocoapods-plugins-1.0.0 Installing ri documentation for cocoapods-plugins-1.0.0 Parsing documentation for cocoapods-search-1.0.1 Installing ri documentation for cocoapods-search-1.0.1 Parsing documentation for cocoapods-trunk-1.6.0 Installing ri documentation for cocoapods-trunk-1.6.0 Parsing documentation for cocoapods-try-1.2.0 Installing ri documentation for cocoapods-try-1.2.0 Parsing documentation for molinillo-0.8.0 Installing ri documentation for molinillo-0.8.0 Parsing documentation for atomos-0.1.3 Installing ri documentation for atomos-0.1.3 Parsing documentation for colored2-3.1.2 Installing ri documentation for colored2-3.1.2 Parsing documentation for nanaimo-0.3.0 Installing ri documentation for nanaimo-0.3.0 Parsing documentation for rexml-3.2.5 Installing ri documentation for rexml-3.2.5 Parsing documentation for xcodeproj-1.21.0 Installing ri documentation for xcodeproj-1.21.0 Parsing documentation for escape-0.0.4 Installing ri documentation for escape-0.0.4 Parsing documentation for fourflusher-2.3.1 Installing ri documentation for fourflusher-2.3.1 Parsing documentation for gh_inspector-1.1.3 Installing ri documentation for gh_inspector-1.1.3 Parsing documentation for ruby-macho-2.5.1 Installing ri documentation for ruby-macho-2.5.1 Parsing documentation for cocoapods-1.11.3 Installing ri documentation for cocoapods-1.11.3 Done installing documentation for ffi, ethon, typhoeus, netrc, public_suffix, addressable, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-trunk, cocoapods-try, molinillo, atomos, colored2, nanaimo, rexml, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 26 seconds 25 gems installed
無事インストールできました。
flutter doctorで確認します。
1 2 3 4
$ ./bin/flutter doctor ...(省略)... [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) ...(省略)...
インストールが終わったら、On first launch it will assist you in installing the Android SDK components.と書かれているので、Android Studioを起動します。
利用規約に同意してその他のコンポーネントをインストールします。
ここまで終わったらflutter doctorで確認します。
1 2 3 4 5 6 7 8 9 10 11
$ ./bin/flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.3, on macOS 11.6.4 20G417 darwin-x64, locale ja-JP) [!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) ✗ cmdline-tools component is missing Run `path/to/sdkmanager --install "cmdline-tools;latest"` See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. ...(省略)...
$ ./bin/flutter doctor --android-licenses Warning: Failed to download any source lists! Fetch remote repository... Warning: Still waiting for package manifests to be fetched remotely. Warning: Still waiting for package manifests to be fetched remotely.y... Warning: Still waiting for package manifests to be fetched remotely.y... Warning: Still waiting for package manifests to be fetched remotely.y... Warning: Still waiting for package manifests to be fetched remotely.y... Warning: Still waiting for package manifests to be fetched remotely.y... Warning: Still waiting for package manifests to be fetched remotely.y... Warning: IO exception while downloading manifesttch remote repository... Warning: IO exception while downloading manifest Warning: Still waiting for package manifests to be fetched remotely.y... All SDK package licenses accepted.======] 100% Computing updates...
$ ./bin/flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.3, on macOS 11.6.4 20G417 darwin-x64, locale ja-JP) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] VS Code (version 1.65.2) [!] Proxy Configuration ! NO_PROXY does not contain 127.0.0.1 ! NO_PROXY does not contain ::1 [✓] Connected device (1 available) [!] HTTP Host Availability ✗ HTTP host https://maven.google.com/ is not reachable. Reason: An error occurred while checking the HTTP host: Operation timed out ✗ HTTP host https://pub.dev/ is not reachable. Reason: An error occurred while checking the HTTP host: Operation timed out ✗ HTTP host https://cloud.google.com/ is not reachable. Reason: An error occurred while checking the HTTP host: Operation timed out
$ ./bin/flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.3, on macOS 11.6.4 20G417 darwin-x64, locale ja-JP) [!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] VS Code (version 1.65.2) [✓] Connected device (1 available) [✓] HTTP Host Availability
$ ./bin/flutter doctor --android-licenses 5 of 7 SDK package licenses not accepted. 100% Computing updates... Review licenses that have not been accepted (y/N)? y
1/5: License android-googletv-license: ...(省略)...
ライセンスが表示されるのでyを押して同意します。
今度こそ最後にflutter doctorで確認します。
1 2 3 4 5 6 7 8 9 10 11 12
$ ./bin/flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.3, on macOS 11.6.4 20G417 darwin-x64, locale ja-JP) [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] VS Code (version 1.65.2) [✓] Connected device (1 available) [✓] HTTP Host Availability