2014-10-17 412 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)。