我正在尝试使用angularjs和cordova应用程序,我需要使用cordova插件,如地图和地理位置。我看过ngCordova,但是没有提供地图插件。出于测试目的,我试图添加地理位置插件,但它并没有构建ios应用程序
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)
谢谢
答案 0 :(得分: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
答案 1 :(得分:0)
我能够解决它的方式是: