flutter webrtc 编译报错 Could not build the precompiled application for the device.

flutter webrtc运行报错

Running Xcode build...
Xcode build done.                                           19.7s
Failed to build iOS app
Error output from Xcode build:
↳
    2022-03-31 15:36:50.750 xcodebuild[10731:312247] Requested but did not find extension point with
    identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension
    Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    2022-03-31 15:36:50.751 xcodebuild[10731:312247] Requested but did not find extension point with
    identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension
    Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in
    com.apple.dt.IDEWatchSupportCore
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
    	/var/folders/55/9mlqm5pn4r570ldrcxqb0mx80000gn/T/flutter_tools.KcBTKD/flutter_ios_build_temp_dir
    	ICE83K/temporary_xcresult_bundle

    /usr/local/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.8.
    4/lib/src/native/rtc_data_channel_impl.dart:16:7: Error: The non-abstract class
    'RTCDataChannelNative' is missing implementations for these members:
     - RTCDataChannel.bufferedAmount
     - RTCDataChannel.id
    Try to either
     - provide an implementation,
     - inherit an implementation from a superclass or mixin,
     - mark the class as abstract, or
     - provide a 'noSuchMethod' implementation.

    class RTCDataChannelNative extends RTCDataChannel {
          ^^^^^^^^^^^^^^^^^^^^
    /usr/local/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/webrtc_interface-1.
    0.3/lib/src/rtc_data_channel.dart:79:11: Context: 'RTCDataChannel.bufferedAmount' is defined
    here.
      int get bufferedAmount;
              ^^^^^^^^^^^^^^
    /usr/local/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/webrtc_interface-1.
    0.3/lib/src/rtc_data_channel.dart:74:11: Context: 'RTCDataChannel.id' is defined here.
      int? get id;
              ^^
    /usr/local/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.8.
    4/lib/src/native/rtc_data_channel_impl.dart:36:15: Error: The return type of the method
    'RTCDataChannelNative.label' is 'String?', which does not match the return type, 'String', of the
    overridden method, 'RTCDataChannel.label'.
    Change to a subtype of 'String'.
      String? get label => _label;
                  ^
    /usr/local/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/webrtc_interface-1.
    0.3/lib/src/rtc_data_channel.dart:77:14: Context: This is the overridden method ('label').
      String? get label;
                 ^
    Failed to package /Users/***/Desktop/CQTOWTSDK_iOS/FlutterSDK/flutter-webrtc-demo.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    /Users/***/Desktop/CQTOWTSDK_iOS/FlutterSDK/flutter-webrtc-demo/ios/Pods/Pods.xcodeproj
    : warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of
    supported deployment target versions is 9.0 to 15.4.99. (in target 'Libyuv' from project 'Pods')

    Result bundle written to path:
    	/var/folders/55/9mlqm5pn4r570ldrcxqb0mx80000gn/T/flutter_tools.KcBTKD/flutter_ios_build_temp_dir
    	ICE83K/temporary_xcresult_bundle


Could not build the precompiled application for the device.

Error launching application on Ming.

尝试了 清除缓存 重装 cocoapods , 重装flutter都不行最后
解决方案:找到flutter加载缓存加载的

  /usr/local/Caskroom/flutter/2.10.3/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webrtc-0.8.
    4/lib/src/native/rtc_data_channel_impl.dart

文件 将
这几个的 get 给去掉
在这里插入图片描述

保存后再次 flutter run 就行了

猜你喜欢

转载自blog.csdn.net/iOS_MingXing/article/details/123874164