xcode FLUTTER类AMSupportURLConnectionDelegate在/usr/lib/libauthinstall.dylib中都实现了

pjngdqdw  于 2022-11-26  发布在  Flutter
关注(0)|答案(1)|浏览(148)

它已经两天寻找如何修复它。我已经做了很多事情,如清除。pub-cache。重建POD文件。没有一个工作。这里是错误输出

Failed to build iOS app
Error output from Xcode build:
↳
    objc[32626]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20083ab90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x103c1c2c8). One of the two will be used. Which one is undefined.
    objc[32626]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20083abe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x103c1c318). One of the two will be used. Which one is undefined.
    ** BUILD FAILED **

Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/gd/6f7z77vj3ps0lvnyj88pxg_40000gn/T/flutter_tools.5Zc7Tf/flutter_ios_build_temp_dirKVWP5a/temporary_xcresult_bundle

    /Users/bobbyjulian/Desktop/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:260:44: error: cannot call value of non-function type 'String?'
                            domain = domainUrl.host()
                                               ^   ~~

    /Users/bobbyjulian/Desktop/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:294:44: error: cannot call value of non-function type 'String?'
                            domain = domainUrl.host()
                                               ^   ~~

    /Users/bobbyjulian/Desktop/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:260:44: error: cannot call value of non-function type 'String?'
                            domain = domainUrl.host()
                                               ^   ~~

    /Users/bobbyjulian/Desktop/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:294:44: error: cannot call value of non-function type 'String?'
                            domain = domainUrl.host()
                                               ^   ~~

    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/gd/6f7z77vj3ps0lvnyj88pxg_40000gn/T/flutter_tools.5Zc7Tf/flutter_ios_build_temp_dirKVWP5a/temporary_xcresult_bundle

Swift Compiler Error (Xcode): Cannot call value of non-function type 'String?'
/Users/bobbyjulian/Desktop/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:259:43

Swift Compiler Error (Xcode): Cannot call value of non-function type 'String?'
/Users/bobbyjulian/Desktop/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/ios/Classes/MyCookieManager.swift:293:43

Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.

根据输出,它说错误来自flutter_inappwebview,而我在我的依赖中没有使用它

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  google_sign_in: ^5.2.4
  get: ^4.6.3
  get_storage: ^2.0.3
  path_provider: ^2.0.9
  http: ^0.13.4
  flutter_svg: ^1.0.3
  intl: ^0.17.0
  contained_tab_bar_view: ^0.8.0
  data_table_2: ^2.2.1
  flutter_launcher_icons: "^0.9.2"
  json_annotation: ^4.4.0
  flutter_switch: ^0.3.2
  url_launcher: ^6.1.6
  google_mobile_ads: ^1.2.0
  package_info_plus: ^1.4.2
  bordered_text: ^2.0.0
  youtube_player_flutter: ^8.1.0
  tutorial_coach_mark: ^1.2.4
  assets_audio_player: ^3.0.5
  carousel_slider: ^4.1.1
  convex_bottom_bar: ^3.0.0
  cached_network_image: ^3.2.1
  unity_ads_plugin: ^0.3.4
  unity_mediation: ^0.0.6
  dotted_border: ^2.0.0+2
  flutter_animation_progress_bar: ^2.2.1
  sign_in_with_apple: ^4.1.0
  device_info_plus: ^6.0.0
  android_id: ^0.0.7
  badges: ^2.0.3
  modal_bottom_sheet: ^2.1.2
  google_fonts: ^3.0.1
  crypto: ^3.0.2
  safe_device: ^1.1.1
  #for Capture image
  screenshot: ^1.2.3
  #for save image to gallery
  image_gallery_saver: ^1.7.1
  #permission_handler: ^10.2.0
  #for rating app
  rate_my_app: ^1.1.3

你有什么解决方案吗?我试图建立一个新的应用程序,它运行顺利,没有任何问题。

brqmpdu1

brqmpdu11#

我假设您使用的xCode版本低于14.0.1
我在使用macOS最新映像构建Azure DevOps时遇到了这个问题。它似乎是macOS-11,默认xCode为13.2.1🤌
切换到macOS-12映像(xCode 14.0.1)后,问题消失。
我花了点时间才弄明白。

相关问题