简体   繁体   中英

Can't use plugins for Cordova

Everytime I want to use a plugin I can't build a project and get this error:

$ cordova emulate ios
Generating config.xml from defaults for platform "ios"
Preparing ios project
Running on emulator for platform "ios" via command "/Users/jakob/Dropbox/Coding/+diplomarbeit/phonegap/rlb_cordova/platforms/ios/cordova/run" --emulator

/Users/jakob/lib/node_modules/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error: An error occurred while emulating/deploying the ios project. ** BUILD FAILED **


The following build commands failed:
  Check dependencies
(1 failure)
2013-12-31 15:54:27.469 xcodebuild[10583:641b]  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/jakob/Dropbox/Coding/+diplomarbeit/phonegap/rlb_cordova/platforms/ios/build/rlb_cordova.build/Debug-iphonesimulator/rlb_cordova.build/Objects-normal/i386/CDVDevice.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “CDVDevice.d” couldn’t be opened because there is no such file." UserInfo=0x7ff3ba0424e0 {NSFilePath=/Users/jakob/Dropbox/Coding/+diplomarbeit/phonegap/rlb_cordova/platforms/ios/build/rlb_cordova.build/Debug-iphonesimulator/rlb_cordova.build/Objects-normal/i386/CDVDevice.d, NSUnderlyingError=0x7ff3ba042590 "The operation couldn’t be completed. No such file or directory"}. User info: {
    NSFilePath = "/Users/jakob/Dropbox/Coding/+diplomarbeit/phonegap/rlb_cordova/platforms/ios/build/rlb_cordova.build/Debug-iphonesimulator/rlb_cordova.build/Objects-normal/i386/CDVDevice.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: 0x7ff3ba041890>{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/rlb_cordova.build/Debug-iphonesimulator/rlb_cordova.build/Objects-normal/i386/CDVDevice.o rlb_cordova/Plugins/org.apache.cordova.device/CDVDevice.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

    at ChildProcess.<anonymous> (/Users/jakob/lib/node_modules/cordova/src/emulate.js:67:22)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

I only used the CLI and didn't mess with any config. Here I tried to install the device plugin like:

$ cordova plugin add org.apache.cordova.device
Fetching plugin from "org.apache.cordova.device"...
Starting installation of "org.apache.cordova.device" for android
Preparing android project
org.apache.cordova.device installed on android.
Starting installation of "org.apache.cordova.device" for ios
Preparing ios project
org.apache.cordova.device installed on ios.

Looks not too bad but however I can't build the project. Just when I remove the plugin with:

$ cordova plugin remove org.apache.cordova.device 

Anyone else having this issues?

My Versions:

$ npm --version
1.3.14

$ node --version
v0.10.22

$ cordova --version
3.3.1-0.1.2

$ git --version
git version 1.8.3.4 (Apple Git-47)

I had the same problem, and I solved It creating the project with uppercase in the first letter of project name. Yes, it seems incredible, but this was the solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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