#【質問】
Firebaseの公式サイトFlutter アプリに Firebase を追加する
に沿ってFlutter アプリを実行しようとすると、長文のエラーが出ます、自分でわかる範囲は試してみましたがエラーは解決しませんでした。
解決策をお教えいただけますか。
#【出ているエラー】
Launching lib/main.dart on iPhone 12 Pro Max in debug mode... lib/main.dart:1 Xcode build done. 830.4s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ In file included from /Users/ホームディレクトリ/work/todo/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc:34: /Users/ホームディレクトリ/work/todo/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:205:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage] typedef struct { ^ grpc_credentials_mdelem_array /Users/ホームディレクトリ/work/todo/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:206:21: note: type is not C-compatible due to this d efault member initializer grpc_mdelem* md = nullptr; ^~~~~~~ /Users/ホームディレクトリ/work/todo/ios/Pods/gRPC-Core/src/core/lib/security/credentials/credentials.h:208:3: note: type is given name 'grpc_credentials_mdelem_array' for linkage purposes by this typedef declaration --------------------------------------------------------------------------------------- #import <Flutter/Flutter.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated. note: Using new build system note: Building targets in parallel note: Planning build note: Analyzing workspace note: Constructing build description note: Build preparation complete warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner') Could not build the application for the simulator. Error launching application on iPhone 12 Pro Max. Exited (sigterm)
※全部載せると長すぎるので最初と最後だけ載せています
#【試したこと】
0. ターミナルでflutter clean
0. このサイトを見てPodfileを書き換えた
0. pubspec.yamlでfirebase関連のプラグインを最新に変えた
#【ファイル】
Podfile
ruby
1# Uncomment this line to define a global platform for your project 2platform :ios, '12.0' 3 4# CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 7project 'Runner', { 8 'Debug' => :debug, 9 'Profile' => :release, 10 'Release' => :release, 11} 12 13def flutter_root 14 generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 unless File.exist?(generated_xcode_build_settings_path) 16 raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 end 18 19 File.foreach(generated_xcode_build_settings_path) do |line| 20 matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 return matches[1].strip if matches 22 end 23 raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24end 25 26require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 28flutter_ios_podfile_setup 29 30target 'Runner' do 31 use_frameworks! 32 use_modular_headers! 33 34 flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35end 36 37post_install do |installer| 38 installer.pods_project.targets.each do |target| 39 target.build_configurations.each do |config| 40 config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' 41 end 42 end 43end
pubspec.yaml
yaml
1name: todo 2description: A new Flutter project. 3 4publish_to: 'none' 5https://developer.android.com/studio/publish/versioning 6 7version: 1.0.0+1 8 9environment: 10 sdk: ">=2.12.0 <3.0.0" 11 12dependencies: 13 flutter: 14 sdk: flutter 15 firebase_core: ^1.5.0 16 firebase_analytics: ^8.3.0 17 18 19 firebase_auth: ^3.0.2 20 cloud_firestore: ^2.5.0 21 22 cupertino_icons: ^1.0.2 23 24dev_dependencies: 25 flutter_test: 26 sdk: flutter 27 28 29flutter: 30 31 32 uses-material-design: true 33 34
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。