颤振:集成firebase和Admob后无法构建iOS应用程序

颤振:集成firebase和Admob后无法构建iOS应用程序,ios,xcode,firebase,flutter,admob,Ios,Xcode,Firebase,Flutter,Admob,我在使用AdMob,所以我必须在我的项目中包括firebase。 我觉得Podfile有问题,但我对flatter还很陌生,我不知道如何解决这个错误。 在我添加Admob之前,该应用程序运行良好。 一开始,我只是添加了Jason文件,而没有更改Podfiles和appdelegate数据,从而实现了firebase的集成。 但是这个应用程序总是显示错误,没有找到firapp或其他什么,所以我做了一些研究,为firebase和admob准备了应用程序deleagte中的pod文件和行,现在一切都不

我在使用AdMob,所以我必须在我的项目中包括firebase。 我觉得Podfile有问题,但我对flatter还很陌生,我不知道如何解决这个错误。 在我添加Admob之前,该应用程序运行良好。 一开始,我只是添加了Jason文件,而没有更改Podfiles和appdelegate数据,从而实现了firebase的集成。 但是这个应用程序总是显示错误,没有找到firapp或其他什么,所以我做了一些研究,为firebase和admob准备了应用程序deleagte中的pod文件和行,现在一切都不起作用了

运行应用程序时,日志显示:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                           102,8s
Failed to build iOS app
Error output from Xcode build:
↳
    2021-01-03 20:31:10.214 xcodebuild[33146:1683247] warning:  The file reference for "Firebase.debug.xcconfig" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-01-03 20:31:10.214 xcodebuild[33146:1683247] warning:  The file reference for "Firebase.release.xcconfig" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-01-03 20:31:10.218 xcodebuild[33146:1683247] warning:  The file reference for "GoogleUtilities.debug.xcconfig" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-01-03 20:31:10.218 xcodebuild[33146:1683247] warning:  The file reference for "GoogleUtilities.release.xcconfig" is a member of multiple groups ("Support Files" and "Support Files"); this indicates a malformed project.  Only the membership in one of the groups will be preserved (but membership in targets will be unaffected).  If you want a reference to the same file in more than one group, please add another reference to the same path.
    2021-01-03 20:32:28.128 xcodebuild[33146:1683564]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-17705/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
    Details:  (null) deviceType from fccbabe047ce389d7f1818829974b98ca79ecafb was NULL when -platform called.
    Object:   <DTDKMobileDeviceToken: 0x7fac7d3bdad0>
    Method:   -platform
    Thread:   <NSThread: 0x7fac7a40e4f0>{number = 7, name = (null)}
    Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
    ** BUILD FAILED **


Xcode's output:
↳
    GoogleDataTransport-hjetnganqxhhsyasdefxkgubodfu
    In file included from /Users/patrickmeyer/AndroidStudioProjects/thirty_day_challange_app/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRHeartbeatInfo.m:17:
    /Users/patrickmeyer/AndroidStudioProjects/thirty_day_challange_app/ios/Pods/FirebaseCore/GoogleUtilities/Logger/Private/GULLogger.h:22:9: fatal error: 'GoogleUtilities/GULLoggerLevel.h' file not found
    #import <GoogleUtilities/GULLoggerLevel.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    In file included from /Users/patrickmeyer/AndroidStudioProjects/thirty_day_challange_app/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m:19:
    /Users/patrickmeyer/AndroidStudioProjects/thirty_day_challange_app/ios/Pods/FirebaseCore/GoogleUtilities/Logger/Private/GULLogger.h:22:9: fatal error: 'GoogleUtilities/GULLoggerLevel.h' file not found
    #import <GoogleUtilities/GULLoggerLevel.h>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    GoogleDataTransport-hjetnganqxhhsyasdefxkgubodfu
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    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 14.3.99. (in target 'FirebaseCore' from project 'Pods')
    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 14.3.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
    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 14.3.99. (in target 'firebase_core' from project 'Pods')
    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 14.3.99. (in target 'Firebase' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'nanopb' from project 'Pods')
    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 14.3.99. (in target 'share' from project 'Pods')
    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 14.3.99. (in target 'firebase_admob' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'GoogleInterchangeUtilities' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'FirebaseInstanceID' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'GoogleSymbolUtilities' from project 'Pods')
    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 14.3.99. (in target 'GoogleAppMeasurement' from project 'Pods')
    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 14.3.99. (in target 'GoogleDataTransport' from project 'Pods')
    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 14.3.99. (in target 'GoogleUtilities' from project 'Pods')
    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'FirebaseAnalytics' from project 'Pods')
    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 14.3.99. (in target 'Flutter' from project 'Pods')
    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 14.3.99. (in target 'shared_preferences' from project 'Pods')

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
和我的播客文件:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods

pod 'Google-Mobile-Ads-SDK'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

我的颤振医生没有显示任何错误。

似乎是
pod update
起了作用。 它正在运行

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods

pod 'Google-Mobile-Ads-SDK'

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end