使用cordova插件的angularjs cordova应用程序

Asi*_*gir 2 angularjs cordova cordova-plugins

我正在尝试使用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)
Run Code Online (Sandbox Code Playgroud)

谢谢

Miq*_*uel 7

可能的原因可能是:

安装插件时出错.您可以尝试重新安装它:

cordova plugin rm org.apache.cordova.geolocation
cordova plugin add org.apache.cordova.geolocation
Run Code Online (Sandbox Code Playgroud)

此外(不太可能,但可能)尝试再次准备应用程序:

cordova prepare ios
Run Code Online (Sandbox Code Playgroud)

或者甚至有时您可以尝试删除整个ios应用并再次添加:

cordova platform rm ios
cordova platform add ios
Run Code Online (Sandbox Code Playgroud)