如何修复Xcode构建错误FBLPromises? (Mac扑扑) [英] How to fixe Xcode build error FBLPromises? ( Mac flutter)

查看:1383
本文介绍了如何修复Xcode构建错误FBLPromises? (Mac扑扑)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解决此错误?

我有最后一个升级,最后一个Xcode 11.5,最后一个MacOS catalina.我已经完成了Xcode 11.5迁移(构建阶段),移至zsh,选择了旧版构建系统,删除所有不兼容的软件包,通过将podfile文件夹放在终端上来重新启动pod安装.发射颤动干净. 这是我的医生-v

I have the last flutter upgrade, last Xcode 11.5, last MacOS catalina. I have done Xcode 11.5 migration (build phase), move to zsh, selected legacy build system, remove all package not compatible, relaunch pod install by focus the podfile folder with the terminal. Launch flutter clean. here is my doctor-v

    [✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale fr-FR)
    • Flutter version 1.17.5 at /Users/quentinguichot/Developer/flutter
    • Framework revision 8af6b2f038 (9 days ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/quentinguichot/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /usr/bin/java
    ✗ Could not determine java version

 
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.3

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] Connected device (1 available)
    • iPhone • 00008030-000448183438802E • ios • iOS 13.3.1

! Doctor found issues in 2 categories.

这是我的错误:

ld: framework not found FBLPromises
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Building targets in parallel

    note: Planning build
    note: Constructing build description

我可以在设备上运行带有波动示例的新projet,但我的projet(当前正在生产)在所有这些升级之前都运行良好,现在出现了此问题...

I can run on my device a new projet, with the flutter example, but my projet ( currently in production) who worked fine before all these upgrade, have now this issue...

我的Podfile

# 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 parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  generated_key_values = {}
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) do |line|
    next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
    plugin = line.split(pattern=separator)
    if plugin.length == 2
      podname = plugin[0].strip()
      path = plugin[1].strip()
      podpath = File.expand_path("#{path}", file_abs_path)
      generated_key_values[podname] = podpath
    else
      puts "Invalid plugin specification: #{line}"
    end
  end
  generated_key_values
end

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  
  # Flutter Pod

  copied_flutter_dir = File.join(__dir__, 'Flutter')
  copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
  copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
  unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
    # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
    # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
    # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.

    generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
    unless File.exist?(generated_xcode_build_settings_path)
      raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
    end
    generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
    cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];

    unless File.exist?(copied_framework_path)
      FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
    end
    unless File.exist?(copied_podspec_path)
      FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
    end
  end

  # Keep pod path relative so it can be checked into Podfile.lock.
  pod 'Flutter', :path => 'Flutter'

  # Plugin Pods

  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
  # referring to absolute paths on developers' machines.
  system('rm -rf .symlinks')
  system('mkdir -p .symlinks/plugins')
  plugin_pods = parse_KV_file('../.flutter-plugins')
  plugin_pods.each do |name, path|
    symlink = File.join('.symlinks', 'plugins', name)
    File.symlink(path, symlink)
    pod name, :path => File.join(symlink, 'ios')
  end
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
#install! 'cocoapods', :disable_input_output_paths => true

post_install do |installer|
   installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
       config.build_settings['ARCHS'] = '$ARCHS_STANDARD_64_BIT'
     end
   end
 end

FBLPromises似乎来自我添加的旧软件包(firebase_ad_mob),我不知道为什么在删除软件包时为什么要引用它……我清理了所有文件,甚至清理了衍生文件和抖动修复缓存

FBLPromises seems to come from an old package I had add ( firebase_ad_mob) I don't know why it take reference while the package is remove ... I clean all, even derivedata and flutter repair cache

删除use_framwork后出现错误!

Here is error after remove use_framwork!

      warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework/Headers' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework/Headers/FLTCookieManager.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework/Headers/FLTWKNavigationDelegate.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework/Headers/FLTWebViewFlutterPlugin.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework/Headers/FlutterWebView.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework/Headers/JavaScriptChannelHandler.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework/Headers/webview_flutter-umbrella.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/webview_flutter/webview_flutter.framework/Info.plist' is located outside of the allowed root paths.
    ...


...
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/vibration/vibration.framework/vibration' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Headers/unique_identifier-Swift.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Headers/unique_identifier-umbrella.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Info.plist' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Modules/module.modulemap' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Modules/unique_identifier.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Modules/unique_identifier.swiftmodule/Project/arm64.swiftsourceinfo' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Modules/unique_identifier.swiftmodule/arm64-apple-ios.swiftdoc' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Modules/unique_identifier.swiftmodule/arm64-apple-ios.swiftmodule' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Modules/unique_identifier.swiftmodule/arm64.swiftdoc' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/Modules/unique_identifier.swiftmodule/arm64.swiftmodule' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/unique_identifier/unique_identifier.framework/unique_identifier' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/shared_preferences/shared_preferences.framework' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/shared_preferences/shared_preferences.framework/Headers' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/shared_preferences/shared_preferences.framework/Headers/FLTSharedPreferencesPlugin.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/shared_preferences/shared_preferences.framework/Headers/shared_preferences-umbrella.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/shared_preferences/shared_preferences.framework/Info.plist' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/shared_preferences/shared_preferences.framework/Modules/module.modulemap' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/shared_preferences/shared_preferences.framework/shared_preferences' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/sensors/sensors.framework' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/sensors/sensors.framework/Headers' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/sensors/sensors.framework/Headers/FLTSensorsPlugin.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/sensors/sensors.framework/Headers/sensors-umbrella.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/sensors/sensors.framework/Info.plist' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/sensors/sensors.framework/Modules/module.modulemap' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/sensors/sensors.framework/sensors' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Headers' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Headers/FlutterRoundedProgressBarPlugin.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Headers/flutter_rounded_progress_bar-Swift.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Headers/flutter_rounded_progress_bar-umbrella.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Info.plist' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Modules/flutter_rounded_progress_bar.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Modules/flutter_rounded_progress_bar.swiftmodule/Project/arm64.swiftsourceinfo' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Modules/flutter_rounded_progress_bar.swiftmodule/arm64-apple-ios.swiftdoc' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Modules/flutter_rounded_progress_bar.swiftmodule/arm64-apple-ios.swiftmodule' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Modules/flutter_rounded_progress_bar.swiftmodule/arm64.swiftdoc' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Modules/flutter_rounded_progress_bar.swiftmodule/arm64.swiftmodule' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/Modules/module.modulemap' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_rounded_progress_bar/flutter_rounded_progress_bar.framework/flutter_rounded_progress_bar' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Headers' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Headers/FlutterEmailSenderPlugin.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Headers/flutter_email_sender-Swift.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Headers/flutter_email_sender-umbrella.h' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Info.plist' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Modules/flutter_email_sender.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Modules/flutter_email_sender.swiftmodule/Project/arm64.swiftsourceinfo' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Modules/flutter_email_sender.swiftmodule/arm64-apple-ios.swiftdoc' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Modules/flutter_email_sender.swiftmodule/arm64-apple-ios.swiftmodule' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Modules/flutter_email_sender.swiftmodule/arm64.swiftdoc' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Modules/flutter_email_sender.swiftmodule/arm64.swiftmodule' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/Modules/module.modulemap' is located outside of the allowed root paths.
    
        warning: Stale file '/Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/flutter_email_sender/flutter_email_sender.framework/flutter_email_sender' is located outside of the allowed root paths.
    
        Command MergeSwiftModule failed with a nonzero exit code
        /Users/quentinguichot/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.2.2/ios/Classes/VibrationPlugin.m:4:17: error: definition of 'VibrationPlugin' must be imported from module 'vibration.VibrationPlugin' before it is required
        @implementation VibrationPlugin
                        ^
        In module 'vibration' imported from /Users/quentinguichot/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.2.2/ios/Classes/VibrationPlugin.m:2:
        /Users/quentinguichot/AndroidStudioProjects/ouiquit/build/ios/Debug-iphoneos/vibration/vibration.framework/Headers/VibrationPlugin.h:3:12: note: previous definition is here
        @interface VibrationPlugin : NSObject<FlutterPlugin>
                   ^
        1 error generated.
        note: Using new build system
        note: Building targets in parallel
        note: Planning build
        note: Constructing build description

推荐答案

我发现的唯一解决方案是使用11.3.1的所有软件包(音频播放器,ad mob,appreview效果很好)将Xcode降级,该应用程序已通过Apple验证. .... Xcode升级..

Only solution I found is to downgrade Xcode with 11.3.1 all packages ( audio player, ad mob, appreview works great ) app was validate by apple. 1 mouth loose because of .... Xcode upgrade ....

这篇关于如何修复Xcode构建错误FBLPromises? (Mac扑扑)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆