Cordova 3.2 ios添加插件“哪个config.xml?它在哪里? [英] Cordova 3.2 ios add plugin "Which config.xml? Where is it?"

查看:434
本文介绍了Cordova 3.2 ios添加插件“哪个config.xml?它在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程式名称是行动应用程式


  1. 建立cordova专案

  2. 新增ios平台

  3. 添加插件cordova插件添加org.apache.cordova.contacts

  4. 转到项目文件夹/ p​​latforms / ios / mobile-app /将以下内容添加到config.xml中




  =联系人> 
< param name =ios-packagevalue =CDVContacts/>
< / feature>





  1. 想要构建ios项目with terminalcordova build ios

我在终端中看到错误:

 从平台ios的默认值生成config.xml 
准备ios项目
在平台ios上通过命令/ users / test / mobile- app / platforms / ios / cordova / build
[错误:构建ios项目时出错** BUILD FAILED **


以下构建命令失败:
检查依赖关系
(1失败)
2014-01-13 20:49:45.743 xcodebuild [6403:4807] DVTAssertions:Warning in / SourceCache / IDEXcode3ProjectSupport / IDEXcode3ProjectSupport-3575 / Xcode3Sources / XcodeIDE /Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
详细信息:无法从``/Users/test/mobile-app/platforms/ios/build/mobile-app.build/加载依赖项输出内容Debug-iphonesimulator / mobile-app.build / Objects-normal / i386 / CDVContacts.d。错误:错误域= NSCocoaErrorDomain代码= 260无法打开文件CDVContacts.d,因为没有这样的文件。 UserInfo = 0x7fa634d724e0 {NSFilePath = / Users / test / mobile-app / platforms / ios / build / mobile-app.build / Debug-iphonesimulator / mobile-app.build / Objects-normal / i386 / CDVContacts.d,NSUnderlyingError = 0x7fa634d72430 操作无法完成,没有这样的文件或目录}。用户信息:{
NSFilePath =/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts。 d;
NSUnderlyingError =错误域= NSPOSIXErrorDomain代码= 2 \操作无法完成。无此文件或目录\;
}。
功能:void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString * __ strong,F)[F = 线程:< NSThread:0x7fa634d723f0> {name =(null),num = 8}
请在http://bugreport.apple.com提出错误,信息。
2014-01-13 20:49:45.774 xcodebuild [6403:5d03] DVTAssertions:Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
详细信息:无法从``/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/加载依赖项输出内容i386 / CDVContact.d。错误:错误域= NSCocoaErrorDomain代码= 260无法打开文件CDVContact.d,因为没有这样的文件。 UserInfo = 0x7fa634e56370 {NSFilePath = / Users / test / mobile-app / platforms / ios / build / mobile-app.build / Debug-iphonesimulator / mobile-app.build / Objects-normal / i386 / CDVContact.d,NSUnderlyingError = 0x7fa634e58160 操作无法完成,没有这样的文件或目录}。用户信息:{
NSFilePath =/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact。 d;
NSUnderlyingError =错误域= NSPOSIXErrorDomain代码= 2 \操作无法完成。无此文件或目录\;
}。
功能:void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString * __ strong,F)[F = 线程:< NSThread:0x7fa634e53090> {name =(null),num = 9}
请在http://bugreport.apple.com提出错误,信息。
** BUILD FAILED **


以下构建命令失败:
CompileC build / mobile-app.build / Debug-iphonesimulator / mobile-app.build /Objects-normal/i386/CDVContacts.o mobile-app / Plugins / org.apache.cordova.contacts / CDVContacts.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build / mobile-app.build / Debug-iphonesimulator / mobile-app.build / Objects-normal / i386 / CDVContact.o mobile-app / Plugins / org.apache.cordova.contacts / CDVContact.m normal i386 objective-c com .apple.compilers.llvm.clang.1_0.compiler
(2次失败)
]


解决方案

这是一个已知的los与cordova的错误。



您必须删除ios平台与cordova平台删除ios。 / p>

然后安装插件。



然后再添加ios平台。



如果你不这样做,ios似乎不能正确安装插件。



我希望这可以帮助你。


My app name is mobile-app

  1. Create a cordova project
  2. add ios platform
  3. add plugin "cordova plugin add org.apache.cordova.contacts"
  4. go to project folder /platforms/ios/mobile-app/ and add the following to config.xml

<feature name="Contacts">
    <param name="ios-package" value="CDVContacts" />
</feature>

  1. want to build the ios project with terminal "cordova build ios"

I get the error in terminal:

generating config.xml from defaults for platform "ios"
Preparing ios project
Compiling app on platform "ios" via command "/Users/test/mobile-app/platforms/ios/cordova/build" 
[Error: An error occurred while building the ios project.** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)
2014-01-13 20:49:45.743 xcodebuild[6403:4807]  DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
Details:  Failed to load dependencies output contents from ``/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file "CDVContacts.d" couldn’t be opened because there is no such file." UserInfo=0x7fa634d724e0 {NSFilePath=/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts.d, NSUnderlyingError=0x7fa634d72430 "The operation couldn’t be completed. No such file or directory"}. User info: {
    NSFilePath = "/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts.d";
    NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, F) [F = <lambda at /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:168:73>]
Thread:   <NSThread: 0x7fa634d723f0>{name = (null), num = 8}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2014-01-13 20:49:45.774 xcodebuild[6403:5d03]  DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
Details:  Failed to load dependencies output contents from ``/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file "CDVContact.d" couldn’t be opened because there is no such file." UserInfo=0x7fa634e56370 {NSFilePath=/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact.d, NSUnderlyingError=0x7fa634e58160 "The operation couldn’t be completed. No such file or directory"}. User info: {
    NSFilePath = "/Users/test/mobile-app/platforms/ios/build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact.d";
    NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, F) [F = <lambda at /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:168:73>]
Thread:   <NSThread: 0x7fa634e53090>{name = (null), num = 9}
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/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContacts.o mobile-app/Plugins/org.apache.cordova.contacts/CDVContacts.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    CompileC build/mobile-app.build/Debug-iphonesimulator/mobile-app.build/Objects-normal/i386/CDVContact.o mobile-app/Plugins/org.apache.cordova.contacts/CDVContact.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
]

解决方案

It's a known bug of los with cordova.

you must remove ios platform with cordova platform remove ios.

then install your plugin.

then add ios platform again.

if you don't do with this order ios seem don't be able to install the plugin right.

i hope this may help you. regards.

这篇关于Cordova 3.2 ios添加插件“哪个config.xml?它在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆