【问题标题】:angularjs cordova application using cordova plugin使用cordova插件的angularjs cordova应用程序
【发布时间】:2014-10-17 20:15:28
【问题描述】:

我正在尝试使用 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)

谢谢

【问题讨论】:

    标签: angularjs cordova cordova-plugins


    【解决方案1】:

    可能的原因有:

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

    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
    

    【讨论】:

    • 删除并再次添加该平台有效!谢谢。
    【解决方案2】:

    我能够解决的方法是:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-20
      • 1970-01-01
      • 1970-01-01
      • 2017-07-11
      • 1970-01-01
      • 2016-04-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多