2014-10-17 327 views
2

我想与angularjs和科尔多瓦应用程序一起工作,我需要使用科尔多瓦插件,如地图和地理定位。我看到ngCordova,但没有提供地图插件。出于测试目的,我尝试添加地理位置插件,但它是不是在所有angularjs科尔多瓦应用使用科尔多瓦插件

clang: error: no such file or directory: '/Users/asifalamgir/Documents/hungryHaven/hungryHavenApp/platforms/ios/hungryHaven/Plugins/org.apache.cordova.geolocation/CDVLocation.m' 
clang: error: no input files 
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1 

** BUILD FAILED ** 


The following build commands failed: 
    CompileC build/hungryHaven.build/Debug-iphonesimulator/hungryHaven.build/Objects-normal/i386/CDVLocation.o hungryHaven/Plugins/org.apache.cordova.geolocation/CDVLocation.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler 
(1 failure) 
Error: /Users/asifalamgir/Documents/hungryHaven/hungryHavenApp/platforms/ios/cordova/build: Command failed with exit code 65 
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) 
    at ChildProcess.emit (events.js:98:17) 
    at maybeClose (child_process.js:756:16) 
    at Process.ChildProcess._handle.onexit (child_process.js:823:5) 

建设iOS应用谢谢

回答

7

可能的原因可能是:

出现了错误安装的插件。你可以尝试重新安装它:

cordova plugin rm org.apache.cordova.geolocation 
cordova plugin add org.apache.cordova.geolocation 

而且(不是最有可能,但可能是)尝试再次准备应用:

cordova prepare ios 

甚至有时你可以尝试删除整个iOS应用并将其添加再次:

cordova platform rm ios 
cordova platform add ios 
+0

删除并重新添加平台的工作!谢谢。 – Utopik 2015-01-24 20:38:11

0

我能解决这个问题的方法是:

  1. 删除平台ios文件夹/目录。
  2. 添加地理位置插件(cordova plugin add org.apache.cordova.geolocation)
  3. 添加回ios平台(离子平台添加ios)。