简体   繁体   English

在物理Android设备上运行Meteor移动应用

[英]Running Meteor mobile app on physical Android device

I'm having an hard time trying to run my Meteor app on my Android device (LG G2). 我在尝试在Android设备(LG G2)上运行Meteor应用程序时遇到了困难。 I googled for answer and didn't find anything like what I encounter. 我用谷歌搜索了答案,但没有找到我遇到的东西。 I followed the instuction and everything went fine, added the Android platform to my project and ran it with meteor run android-device . 我按照指示进行,一切正常,将Android平台添加到我的项目中,并使用meteor run android-device了它。 The device LG G2 is plugged with a USB cable to the machine I'm building and running the app with, and the device has USB debugging enabled. LG G2设备已通过USB电缆插入我正在构建和运行该应用程序的计算机上,并且该设备已启用USB调试。 Everything seem to be fine, my terminal indicates: 一切似乎都很好,我的终端显示:

Started proxy.
Started app on Android Device.
I20150530-16:38:11.280(3)? - waiting for device -
Started MongoDB.
Started your app.

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

No error indication, nothing suspicous, but the app doesn't come up on the device. 没有错误指示,没有可疑之处,但该应用程序未在设备上启动。 Nothing happens. 什么都没发生。 Anyone has a clue? 有人知道吗? I tried to give my own IP and port to the command without a change. 我尝试将自己的IP和端口分配给命令,而不进行任何更改。

You need to set the USB connexion on your android device as "camera". 您需要将Android设备上的USB连接设置为“相机”。 Whith my s4 mini I had the same symptoms and that was the solution. 我的s4 mini出现了同样的症状,这就是解决方案。

I'll list what I've done to solve it, because it's a mix of all the solutions I got here. 我将列出为解决该问题所做的工作,因为这是我在此处获得的所有解决方案的混合。

I'm using Ubuntu, and LG G2 as device. 我正在使用Ubuntu和LG G2作为设备。

  • I created the /etc/udev/rules.d/51-android.rules. 我创建了/etc/udev/rules.d/51-android.rules. file with 与文件
    SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="1004", GROUP="plugdev" inside. SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="1004", GROUP="plugdev" (Detailed instructions here on step 3: http://developer.android.com/tools/device.html#setting-up , thank you @ChristianFritz). (此处是第3步的详细说明: http : //developer.android.com/tools/device.html#setting-up ,谢谢@ChristianFritz)。 Pay attention that "1004" is the vendor 注意“ 1004”是供应商
    ID of LG. LG的ID。

  • I realised that for some reason I didn't have the ADB on my machine so I couldn't use adb devices and connect with my device. 我意识到,由于某种原因,我的计算机上没有ADB,因此无法使用adb设备并与设备连接。 I followed this guide: 我遵循了此指南:
    http://lifehacker.com/the-easiest-way-to-install-androids-adb-and-fastboot-to-1586992378 to install the missing ADB (linux section). http://lifehacker.com/the-easiest-way-to-install-androids-adb-and-fastboot-to-1586992378以安装缺少的ADB(Linux部分)。

  • I got an error: adb server is out of date. killing... 我收到一个错误: adb server is out of date. killing... adb server is out of date. killing... which terminated connection between the device to the machine, but after following @yoh advice, I changed my USB connection from MTP to PTP and tried again. adb server is out of date. killing...终止了设备与计算机之间的连接,但是在遵循@yoh建议之后,我将USB连接从MTP更改为PTP,然后再次尝试。 This time worked. 这次工作了。

Managed to run my app successfully on physical LG G2 after those steps using Ubuntu. 在使用Ubuntu的那些步骤之后,设法在物理LG G2上成功运行了我的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM