我正试图让我的离子项目早些时候提交。我下载它,安装任何未安装的必需软件包(ionic-native
),我可以使用ionic package build ios
构建它 - 它只是将它上传到设备。这是错误输出,它在加载到设备之前的最末端吐出:
...
ld: 2 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** ARCHIVE FAILED **
The following build commands failed:
Ld /Users/eamonwhite/Library/Developer/Xcode/DerivedData/myApp-bnwtqimovpcmyxaamvattontsmzm/Build/Intermediates/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/myApp.build/Debug-iphoneos/myApp.build/Objects-normal/arm64/myApp normal arm64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/eamonwhite/Downloads/ionicmane-82759f57fa193e7843d98642ee1dcf795d58659b/platforms/ios/cordova/build-debug.xcconfig,-workspace,myApp.xcworkspace,-scheme,myApp,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,myApp.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/eamonwhite/Downloads/ionicmane-82759f57fa193e7843d98642ee1dcf795d58659b/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/eamonwhite/Downloads/ionicmane-82759f57fa193e7843d98642ee1dcf795d58659b/platforms/ios/build/sharedpch
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova run ios --device (exit code 1).
我已经完成了xcode中需要完成的所有代码签名工作,并修复了任何警告 - 所以我不确定它来自何处。
更新
我在<engine name="ios" spec="~4.4.0" />
中有config.xml
而在"cordova-ios": "~4.4.0"
中有package.json
。在尝试此操作之前,我将cordova-ios
更新为4.5.1并尝试了它,但没有运气。然后我通过运行npm uninstall cordova-ios && npm install cordova-ios@~4.4.0
将其降级回4.4.0(按照建议) - 它不起作用。
答案 0 :(得分:1)
这是新版Cordova iOS引擎的最新错误。
在config.xml中更改以下内容
<engine
name="ios"
spec="~4.4.0"/>
注意: ^ 替换为版本4.4.0的〜
现在,您可以将您的离子项目运行到您的设备上而不会出现任何错误。