无法构建cordova流星应用程序(错误:ENOENT)

时间:2015-04-05 19:32:18

标签: android cordova meteor

我正在尝试使用meteor build构建我的android meteor应用程序但是当我运行命令时它给了我这个错误。我应该提一下,部署和流星运行工作正常。

[sqrdcat@localhost assignr]$ meteor build ~/build2 --server=assignly.meteor.com

/home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:278
                        throw(ex);
                              ^
Error: ENOENT, readdir '/home/sqrdcat/Documents/METEOR/assignr/.meteor/local/cordova-build/platforms/android/ant-build'
    at Object.Future.wait (/home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:398:15)
    at Object.wrapper (/home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/tools/files.js:1330:24)
    at findApkPath (/home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/tools/commands.js:956:30)
    at /home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/tools/commands.js:941:21
    at Array.forEach (native)
    at Function._.each._.forEach (/home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at buildCommand (/home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/tools/commands.js:924:29)
    at Command.main.registerCommand._.extend.name [as func] (/home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/tools/commands.js:738:12)
    at /home/sqrdcat/.meteor/packages/meteor-tool/.1.0.45.t9p8sg++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/tools/main.js:1345:23

1 个答案:

答案 0 :(得分:1)

以下对我有用,我不确定实际上是什么解决了 - 但我的猜测是这是一个“权利”问题,因为只有sudo模式下的命令才能为我修复它:

  1. rm -rf .meteor/local/cordova-build/
  2. sudo meteor remove-platform android
  3. sudo meteor add-platform android
  4. sudo meteor build .build --server http://myserver.com