我使用以下说明http://docs.phonegap.com/en/2.0.0/guide_command-line_index.md.html#Command-Line%20Usage来设置iOS的命令行工具。
但是当我尝试使用$ / path / to / my_new_cordova_project / cordova / debug
构建项目时我明白了:
In file included from /Users/jakob/Dropbox/Coding/phonegap/ios_project/ios_project/Classes/AppDelegate.m:28:
/Users/jakob/Dropbox/Coding/phonegap/ios_project/ios_project/Classes/AppDelegate.h:30:9: fatal error: 'Cordova/CDVViewController.h' file not found
#import <Cordova/CDVViewController.h>
^
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC build/ios_project.build/Debug-iphonesimulator/ios_project.build/Objects-normal/i386/MainViewController.o ios_project/Classes/MainViewController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/ios_project.build/Debug-iphonesimulator/ios_project.build/Objects-normal/i386/AppDelegate.o ios_project/Classes/AppDelegate.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
当我使用Xcode构建项目时,一切正常,但我更喜欢使用命令行工具。
我得到了: Xcode 5.0 PhoneGap 2.9.1和我在3.4.0中试过
答案 0 :(得分:0)
可能使用工作区文件出现此错误。尝试使用xcode项目目录可以解决问题。