MeteorJS:无法管理在Android模拟器/设备上部署流星应用程序 [英] MeteorJS: Can't manage to deploy meteor app on Android emulator/device

查看:141
本文介绍了MeteorJS:无法管理在Android模拟器/设备上部署流星应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Linux Mint 17(基于Ubuntu 14.04)
我试图在模拟器和设备上运行我的meteor应用程序。

I'm running Linux Mint 17 (based on Ubuntu 14.04) I tried to run my meteor app both on emulator and device.

请注意我必须使用 sudo 防止出现以下错误:

Please note I had to use sudo to prevent the following error:


在移动平台上运行时出错:EACCES,
'/ home / manuel / __ DEV / PROJECTS / __ test / simple-todos / .meteor / local / cordova-build / resources / android_hdpi.icon.png'

Error while running for mobile platforms: EACCES, unlink '/home/manuel/__DEV/PROJECTS/__test/simple-todos/.meteor/local/cordova-build/resources/android_hdpi.icon.png'

模拟器上:

sudo meteor run android
Starting android emulator                     
[[[[[ ~/__DEV/_PROJECTS_/__test/simple-todos ]]]]]

=> Started proxy.                             
=> Started MongoDB.                           
=> Started app on Android Emulator.           
=> Started your app.                          

=> App running at: http://localhost:3000/

显示和加载模拟器。但未加载应用程序,我在应用程序库中找不到它
此外,如果我尝试打开浏览器(在模拟器),并转到 http:// localhost:3000 / ,它告诉我它不存在(而在PC上它同时工作)。

The emulator is shown and loaded. However no app is loaded and I can't find it in application drawer either. Also if I try to open the browser (in the emulator) and go to http://localhost:3000/, it tells me it doesn't exist (while on PC it works at the same time). The PC and the Android device are on the same wifi network.

设备上:

sudo meteor run android-device
WARNING: You are testing your app on a remote device.For the mobile app to be
         able to connect to the local server, make sure your device is on the
         same network, and that the network configuration allows clients to
         talk to each other (no client isolation).
[[[[[ ~/__DEV/_PROJECTS_/__test/simple-todos ]]]]]

=> Started proxy.                             
=> Started MongoDB.                           
=> Started app on Android Device.             
I20150804-19:27:46.494(2)? - waiting for device -
=> Started your app.                          

=> App running at: http://localhost:3000/

对于设备,它会跳过直到在 http:// localhost:3000 / 上运行的应用程序。事实上在PC上它的工作。
我尝试安装adb并运行 adb devices (甚至与sudo),没有办法,我可以设法列出Android设备,甚至不使用 adb over wifi <

In this case after -waiting for device-, it skips straights to app running on http://localhost:3000/. In fact on PC it works. I tried to install adb and run adb devices (even with sudo) and no way I can manage to list the android devices there, not even by using adb over wifi (and connecting via adb connect which on Windows always worked seamlessly.

有关如何解决此问题的任何线索?

Any clue on how I can troubleshoot this?

推荐答案

我发现了几个潜在的问题需要解决。

I've found several potential issues to solve.


  1. 除了Meteor和Cordova之外,您还必须安装Apache Ant和Gradle。

  1. Make sure in addition to Meteor and Cordova you have Apache Ant and Gradle installed.

如果没有运行SUDO, .meteor设置为您的所有权

If not running SUDO, make sure all files in .meteor are set to your ownership

从Android SDK加载AVD设备( android avd ) ,选择设备,点击开始,并确保您选择删除所有用户数据选项

Load the AVD device from the Android SDK (android avd), select device, click start, and make sure you select delete all user data option

如果流星运行android仍然无法加载应用程序, .meteor / local / cordova-build / platforms / android / cordova 并输入 ./ build

if meteor run android still fails to load the app, in terminal go to the .meteor/local/cordova-build/platforms/android/cordova and type ./build You can watch the build process for errors and make sure the .apk is created

假设构建正确,请输入 ./ run ,它现在应该加载到模拟器。

Assuming the build works ok, type ./runand it should now load up fine into the emulator. If not, look back through the run output and see where things are breaking down.

code> meteor run android 。如果无法更新应用程式,请再次执行步骤3(清除AVD使用者资料)

It should then work when you type meteor run android. If that fails to update the app, perform step 3 again (clear the AVD user data)

任何事情,就像我能告诉的流星。我已经测试这个在一个virtualbox和它工作正常,尽管评论说它不会工作。

None of this had anything to do with Meteor as far as I could tell. I have testing this on a virtualbox and it worked fine despite comments saying it wouldn't work.

这篇关于MeteorJS:无法管理在Android模拟器/设备上部署流星应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆