gpt4 book ai didi

objective-c - PhoneGap 如何从命令行进行发布构建

转载 作者:太空狗 更新时间:2023-10-30 03:29:30 29 4
gpt4 key购买 nike

我通过调用进行发布构建:

xcodebuild -project HelloWorld -sdk iphoneos5.1 -configuration Release install

但对于 PhoneGap 应用程序,我收到此错误:

** BUILD FAILED **

The following build commands failed: CompileC build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/AppDelegate.o Phonefinch/Classes/AppDelegate.m normal armv6 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

当我尝试时:

xcodebuild -project HelloWorld -sdk iphoneos5.1 -configuration Release clean build

我得到:

2012-10-04 22:51:52.776 xcodebuild[20016:4107] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-1559/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:87 Details: Failed to load dependencies output contents from ``/Users/camobap-mac/Projects/Phonefinch/build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/AppDelegate.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “AppDelegate.d” couldn’t be opened because there is no such file." UserInfo=0x400eabf40 {NSFilePath=/Users/camobap-mac/Projects/Phonefinch/build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/AppDelegate.d, NSUnderlyingError=0x40079c140 "The operation couldn’t be completed. No such file or directory"}. User info: { NSFilePath = "/Users/camobap-mac/Projects/Phonefinch/build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/AppDelegate.d"; NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\""; }. Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *, void (^)(NSString *)) Thread: {name = (null), num = 7} Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide. ** BUILD FAILED **

The following build commands failed: CompileC build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv7/AppDelegate.o Phonefinch/Classes/AppDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/AppDelegate.o Phonefinch/Classes/AppDelegate.m normal armv6 objective-c com.apple.compilers.llvm.clang.1_0.compiler (2 failures) 2012-10-04 22:52:04.887 xcodebuild[20016:4f0f] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-1559/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:87 Details: Failed to load dependencies output contents from ``/Users/camobap-mac/Projects/Phonefinch/build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/MainViewController.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “MainViewController.d” couldn’t be opened because there is no such file." UserInfo=0x400ef6e40 {NSFilePath=/Users/camobap-mac/Projects/Phonefinch/build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/MainViewController.d, NSUnderlyingError=0x400ef24a0 "The operation couldn’t be completed. No such file or directory"}. User info: { NSFilePath = "/Users/camobap-mac/Projects/Phonefinch/build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/MainViewController.d"; NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\""; }. Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *, void (^)(NSString *)) Thread: {name = (null), num = 10} Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide. ** BUILD FAILED **

The following build commands failed: CompileC build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/AppDelegate.o Phonefinch/Classes/AppDelegate.m normal armv6 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC build/Phonefinch.build/Release-iphoneos/Phonefinch.build/Objects-normal/armv6/MainViewController.o Phonefinch/Classes/MainViewController.m normal armv6 objective-c com.apple.compilers.llvm.clang.1_0.compiler (2 failures)

如果我调用 cordova/debug -> ** BUILD SUCCESS **,但是我的 .app 是在 Debug 模式下编译的。如何在命令行上创建发布版本?

最佳答案

我遇到了完全相同的问题。我不知道我的解决方案是否适用于您的问题。但是,这是我解决它的方法:我想您正在使用 Xcode 项目中的 cordova 子项目。检查你的cordova项目是否有相同的配置名称。

例如:当您的主项目的发布配置称为“ReleaseAdHoc”时,请确保您的 cordova 子项目也具有此名称的配置。此外,请确保为主项目和子项目的“存档”过程选择这些配置。

希望这对您有所帮助。

关于objective-c - PhoneGap 如何从命令行进行发布构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12660144/

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