今まで、VS codeとiOs simulatorを使用しflutterで問題なくコーディングできていたのですが、最近急にiOSがbuildしなくなりました。stackoverflowなどを調べていくつか試したのですが、全く立ち上がらなくなり、恥ずかしながら泥沼にハマってしまいました。
terminalでのErrorは下記のように出ます。
Launching lib/main.dart on iPhone 13 in debug mode... Running pod install... 3.0s Running Xcode build... Xcode build done. 26.9s Failed to build iOS app Error output from Xcode build: ↳ --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } { platform:iOS Simulator, id:DA2B66FB-62C0-4FAA-B781-86CDDBC04BF4, OS:15.0, name:iPad (9th generation) } { platform:iOS Simulator, id:71A5C865-C3A3-4B33-AC86-1F989ED2DD25, OS:15.0, name:iPad Air (4th generation) } { platform:iOS Simulator, id:BA609143-F046-4BDF-A82D-4F078F7ADA0F, OS:15.0, name:iPad Pro (9.7-inch) } { platform:iOS Simulator, id:C5F1A0D9-09DB-4082-807F-ECC22ACACCB4, OS:15.0, name:iPad Pro (11-inch) (3rd generation) } { platform:iOS Simulator, id:CCAD9BF6-6B5B-436E-A9BA-277ACE49AF50, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) } { platform:iOS Simulator, id:BA1E00BA-F848-45F6-9E83-9F39E8B6A2B1, OS:15.0, name:iPad mini (6th generation) } { platform:iOS Simulator, id:0FDC0343-DC68-4F82-8117-F04D706A7311, OS:15.0, name:iPhone 8 } { platform:iOS Simulator, id:72F4A640-03CA-4959-B7D6-4D0431AB21CE, OS:15.0, name:iPhone 8 Plus } { platform:iOS Simulator, id:51C75426-375D-44E8-82DE-CAAF0EF4CFC6, OS:15.0, name:iPhone 11 } { platform:iOS Simulator, id:247DA8FE-942C-460C-8194-2B22E5FF42AA, OS:15.0, name:iPhone 11 Pro } { platform:iOS Simulator, id:BC900D82-58DC-4736-AA80-7CC67D02D308, OS:15.0, name:iPhone 11 Pro Max } { platform:iOS Simulator, id:5815B076-6246-4E17-B6A1-F763783DF3F1, OS:15.0, name:iPhone 12 } { platform:iOS Simulator, id:FDC2E8B3-5B21-4809-83E4-658E31B5B7E2, OS:15.0, name:iPhone 12 Pro } { platform:iOS Simulator, id:0D1D17AC-1FA7-4388-9F3A-5E18F4942327, OS:15.0, name:iPhone 12 Pro Max } { platform:iOS Simulator, id:505297DE-BAB8-46A5-822B-426AA80DBE05, OS:15.0, name:iPhone 12 mini } { platform:iOS Simulator, id:886A7A7F-432C-446B-832E-5A4BD9671E4E, OS:15.0, name:iPhone 13 } { platform:iOS Simulator, id:00F1C878-C7C5-4879-84B8-F4B1E4F7C112, OS:15.0, name:iPhone 13 Pro } { platform:iOS Simulator, id:9D354758-9504-4BA2-8363-1E6B6B4ABE4F, OS:15.0, name:iPhone 13 Pro Max } { platform:iOS Simulator, id:0FFF6889-A640-4BFF-81BA-11C95D21531A, OS:15.0, name:iPhone 13 mini } { platform:iOS Simulator, id:47310495-9189-48E4-81F2-0A5B46098AE9, OS:15.0, name:iPhone SE (2nd generation) } { platform:iOS Simulator, id:0E8FED20-C3C6-4F42-91A0-5AD25C063283, OS:15.0, name:iPod touch (7th generation) } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } ** BUILD FAILED ** Xcode's output: ↳ ../../development/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_ layout.dart:134:45: Error: The getter 'body1' isn't defined for the class 'TextTheme'. - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../development/flutter/packages/flutter/lib/src/material/text_theme.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'. color ??= Theme.of(context).textTheme.body1!.color; ^^^^^ Failed to package /Users/****************/VScode/health_app. Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Planning note: Build preparation complete note: Building targets in parallel /Users/****************/VScode/health_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'AppAuth' from project 'Pods') /Users/****************/VScode/health_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'GoogleSignIn' from project 'Pods') Could not build the application for the simulator. Error launching application on iPhone 13.
ここのサイトを参照しましたが、Xcode上でうまくいかない(どうすれば良いかわからない)です。
解決方法をお教えしていただきたいです。よろしくお願いします。
下記flutter doctorです
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.5.2, on macOS 11.6 20G165 darwin-x64, locale ja-US) [!] Android toolchain - develop for Android devices (Android SDK version 31.0.0) ✗ 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. [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 2020.3) [✓] VS Code (version 1.55.2) [✓] Connected device (2 available) ! Doctor found issues in 1 category.
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。
2021/10/29 12:21
2021/10/29 12:55
2021/11/03 00:13 編集