流星地理定位包为android错误

时间:2015-02-16 16:09:33

标签: android cordova meteor

我正在尝试在Meteor的android平台上获取我的位置当前位置。我在网上遵循了这些说明mdg:geolocation它的工作正常,但在我尝试运行此命令时在移动平台(Android)上

meteor run android-device 

它给了我这个错误日志。

Error while running for mobile platforms: Error running                            
/Users/muhammadfazilqureshi/.meteor/packages/meteor-tool/.1.0.40.3rwpx3++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/cordova-scripts/cordova.sh
Error: version not found: 0.3.0 : org.apache.cordova.geolocation/0.3.0
at RegClient.<anonymous>
(/Users/muhammadfazilqureshi/.meteor/packages/meteor-tool/.1.0.40.3rwpx3++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:272:14)
at Request.self.callback
(/Users/muhammadfazilqureshi/.meteor/packages/meteor-tool/.1.0.40.3rwpx3++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:148:22)
at Request.emit (events.js:98:17)
at Request.<anonymous>
(/Users/muhammadfazilqureshi/.meteor/packages/meteor-tool/.1.0.40.3rwpx3++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:876:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous>
(/Users/muhammadfazilqureshi/.meteor/packages/meteor-tool/.1.0.40.3rwpx3++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:827:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13)

我正在使用OS X Yosemite

2 个答案:

答案 0 :(得分:2)

目前有一个Cordova插件中断。请参阅此问题:https://github.com/meteor/meteor/issues/3726

如果您使用meteor add cordova:org.apache.cordova.geolocation@0.3.10手动添加最新版本,则可以解决您的问题。

答案 1 :(得分:1)

好像你有包的过期版本(3.0.0)

尝试运行更新命令或remove/add

meteor add cordova:org.apache.cordova.geolocation@0.3.10

请务必将代码放在Meteor.startup(function(){});

Meteor.startup(function () {
   //Code here
});

您是否已经查看过此文档? Meteor Cordova Phonegap integration