gpt4 book ai didi

ios - 如何修复 Flutter 无法构建 iOS 应用程序?

转载 作者:行者123 更新时间:2023-12-05 05:40:31 25 4
gpt4 key购买 nike

我将我的 Xcode 更新为版本 13.4,并将 android studio 更新为 Chipmunk,在此之后,我在尝试为 ios 构建时遇到以下错误。此问题仅发生在 ios 构建中。

下面是我得到的日志。

Xcode build done.                                           19.5s
Failed to build iOS app
Error output from Xcode build:

2022-05-27 19:18:46.624 xcodebuild[62430:463863] 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-05-27 19:18:46.624 xcodebuild[62430:463863] 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/6v/14mdnyyd4vs7gh4r1ry0hfxh0000gn/T/flutter_tools.IBcqbj/flutter_ios_build_temp_dirq4Dibw/temporary_xcresult_bundle


Failed to package /Users/bhaskarrajaryal/AndroidStudioProjects/PersonalProjects/FlutterProjects/testing.
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

Result bundle written to path:
/var/folders/6v/14mdnyyd4vs7gh4r1ry0hfxh0000gn/T/flutter_tools.IBcqbj/flutter_ios_build_temp_dirq4Dibw/temporary_xcresult_bundle


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

谁能帮我解决这个问题,因为我因此被困了几天?

最佳答案

The problem here is that the Podfile that Flutter template creates bydefault has no specific iOS version set unfortunately.

执行此操作以解决此问题:

在项目的 ios/文件夹中,打开 Podfile。在 Podfile 顶部,确保此行未被注释掉并将 iOS 版本更改为 12.0。

更改自:

#platform :ios, '8.0'

到:

平台:ios,'12.0'在项目的 ios/文件夹内的终端中运行 pod deintegrate。

在您的 ios/文件夹中运行 pod install --repo-update

这应该可以解决问题!

如果在此之后您收到以下错误

CocoaPods 没有设置您项目的基本配置,因为您的项目已经有一个自定义配置集。为了让 CocoaPods 集成正常工作,请设置目标的基本配置

然后您需要在 Xcode 中打开您的 iOS 工作区并在左上角选择您的根项目,然后在“信息”选项卡中选择您的配置(在本例中为“调试”)并将其更改为“无”。之后,再次执行 pod install。

这里的图片: CLICK HERE

关于ios - 如何修复 Flutter 无法构建 iOS 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72406350/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com