在iOS中使用google_maps_flutter-0.5.28 + 1应用程序后不起作用



i 在 google_maps_flutter-0.5.27+1 及之后使用 我将 macOS 更新为 macOS Catalina 10.15.5,将 Xcode 更新为 Xcode 11.5 现在我使用 Flutter 1.17.2 我更新了所有软件包并将google_maps_flutter更新为 0.5.28+1 当我在真正的iOS iPad中运行我的应用程序时,我收到此错误

Launching lib/main.dart on iPad in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 83YNLV6KMA
Running pod install...                                             36.8s
Xcode build done.                                           50.6s
Failed to build iOS app
Error output from Xcode build:
↳
2020-06-02 11:25:57.501 xcodebuild[33948:249015]  DTDeviceKit: deviceType from 4a5c1dc1e2024c618604a3b9f8f9d55e73592c5c was NULL
2020-06-02 11:25:57.576 xcodebuild[33948:249009]  DTDeviceKit: deviceType from 4a5c1dc1e2024c618604a3b9f8f9d55e73592c5c was NULL
** BUILD FAILED **
Xcode's output:
↳
Command CompileSwift failed with a nonzero exit code
/users/dell/desktop/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.28+1/ios/Classes/FLTGoogleMapsPlugin.m:17:14: error: no visible @interface for 'NSObject<FlutterPluginRegistrar>' declares the selector 'registerViewFactory:withId:gestureRecognizersBlockingPolicy:'
[registrar registerViewFactory:googleMapFactory
~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
Error launching application on iPad.
Exited (sigterm)

如何修复此错误?

从@robmr88回答的其他网站复制,它对我有用。

删除旧的 FLutter.framework

rm -rf ios/Flutter/Flutter.framework,然后 flutter clean。

它在我创建新的颤振项目并将所有文件移动到新项目后工作

相关内容