繁体   English   中英

离子 Cordova 构建以 xcodebuild 结束:命令失败,退出代码 65

[英]Ionic Cordova Build Ending With xcodebuild: Command failed with exit code 65

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

我试过这个解决方案: Ionic ios build failed, 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)

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

打开 XCode、Go 到 File-> Workplace Settings-> Change build system 到 Legacy Build System。

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

在此处输入图像描述

就我而言,我通过将 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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM