【问题标题】:Ionic Cordova Build Ending With xcodebuild: Command failed with exit code 65Ionic Cordova 构建以 xcodebuild 结束:命令失败,退出代码 65
【发布时间】:2020-09-02 22:12:25
【问题描述】:

在我的 ionic 项目上运行 cordova build ios 时,我收到此错误: xcodebuild: Command failed with exit code 65

我试过这个解决方案:Ionic ios build fails, error archive not found

还有这个:https://forum.ionicframework.com/t/build-ios-error-code-65/120058

还有这个:https://github.com/apache/cordova-ios/issues/407

但似乎没有任何效果。我正在使用 Angular 9 运行 Ionic 5。 我使用的是 Macbook Pro Mojave 10.14.6 和 Xcode 11.3.1。

任何帮助将不胜感激。此外,这在构建过程中以黄色返回给我:“没有找到模拟器”。回退到默认目标。”

更新:

人们要求提供完整的错误日志,所以我运行了cordova build ios --verbose

NUS12256-9-darhart:status-app darhart$ cordova build ios --verbose
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform ios
Checking for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in ios platform
No differences found between plugins added to project and installed in ios platform. Continuing...
Generating platform-specific config.xml from defaults for iOS at /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/MyApp/config.xml
Merging project's config.xml into platform-specific iOS config.xml
Merging and updating files from [www, platforms/ios/platform_www] to platforms/ios/www
Current launch storyboard CDVLaunchScreen
Not changing launch storyboard setting in info plist.
Wrote out iOS Bundle Version "0.0.1" to /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/MyApp/MyApp-Info.plist
No need to update build settings for launch storyboard support.
Set IPHONEOS_DEPLOYMENT_TARGET to "11.0".
Did not update build settings for launch storyboard support.
iOS Product Name has not changed (still "MyApp")
Updating icons at platforms/ios/MyApp/Images.xcassets/AppIcon.appiconset/
Updating splash screens at platforms/ios/MyApp/Images.xcassets/LaunchImage.launchimage/
Updating launch storyboard images at platforms/ios/MyApp/Images.xcassets/LaunchStoryboard.imageset/
Updating Storyboard image set contents.json
This app does not have additional resource files defined
Prepared iOS project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
No simulator found for ". Falling back to the default target.
Building for "iPhone 11 Pro Max" Simulator (com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro-Max, iPhone-11-Pro-Max).
Building project: /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/MyApp.xcworkspace
        Configuration: Debug
        Platform: emulator
        Target: iPhone 11 Pro Max
Running command: xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration Debug -sdk iphonesimulator -destination platform=iOS Simulator,name=iPhone 11 Pro Max build CONFIGURATION_BUILD_DIR=/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/emulator SHARED_PRECOMPS_DIR=/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/sharedpch
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/emulator
    SDKROOT = iphonesimulator13.2
    SHARED_PRECOMPS_DIR = /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/sharedpch

note: Using new build system
note: Planning build
note: Constructing build description
error: /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/cordova/../pods-debug.xcconfig:2: could not find included file 'Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig' in search paths (in target 'MyApp' from project 'MyApp')
error: /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/cordova/../pods-debug.xcconfig:2: could not find included file 'Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig' in search paths (in target 'MyApp' from project 'MyApp')
error: /Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/cordova/../pods-debug.xcconfig:2: could not find included file 'Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig' in search paths (in target 'MyApp' from project 'MyApp')

** BUILD FAILED **

Command finished with error code 65: xcodebuild -workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 11 Pro Max,build,CONFIGURATION_BUILD_DIR=/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/platforms/ios/build/sharedpch
xcodebuild: Command failed with exit code 65
Error: xcodebuild: Command failed with exit code 65
    at ChildProcess.whenDone (/Users/darhart/Desktop/Repositories/Darrow_Projects/status-app/status-app/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:311:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

【问题讨论】:

  • 您使用的 Cordova 版本是什么?
  • 运行 cordova build ios --verbose 并将完整日志粘贴到某处(例如 Pastebin),因为这将包含错误的详细信息 - xcodebuild 失败错误代码不足以诊断问题的原因。
  • @PankajSati 我正在运行版本 9
  • @DaveAlden 查看 OP 中的更新
  • 运行cd platforms/ios && pod install。如果这导致错误,请发布包含错误消息的控制台输出。

标签: ios angularjs cordova ionic-framework


【解决方案1】:

使用 XCode 的旧版构建系统为 iOS 构建应用程序。

打开 XCode,转到 File-> Workplace Settings-> 将构建系统更改为 Legacy Build System。

然后您可以从 XCode 本身在 iPhone 模拟器上运行您的应用程序。

【讨论】:

  • OP 帖子中的评论有效,感谢您提供答案,但我将使用 @DaveAlden 所写的内容。
【解决方案2】:

就我而言,我通过将 cordova-ios 版本从 4.5.5 更改为 5.1.1 解决了这个问题。

ionic cordova platform rm ios
ionic cordova platform add ios@5.1.1

同时检查是否有任何插件产生了问题,如果有,那么删除并再次添加该插件会很有帮助。

也检查一下https://github.com/apache/cordova-ios/issues/855#issuecomment-669214469

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-09-30
    • 1970-01-01
    • 1970-01-01
    • 2019-08-28
    • 2020-05-10
    • 2019-04-26
    • 2018-03-25
    相关资源
    最近更新 更多