Android 在 genymotion 上启动我的应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21465687/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Start my application on genymotion
提问by giacomotb
I have just installed genymotions, but when I try to start my app on it, as described at the end of this paragraph, eclipse starts the old emulator even if the new one(genymotion) is running. I tried to change the debug configuration but the only virtual devices that I can see in target
are the old emulators(see the photo below).
我刚刚安装了 genymotions,但是当我尝试在它上面启动我的应用程序时,如本段末尾所述,即使新的模拟器(genymotion)正在运行,eclipse 也会启动旧的模拟器。我试图更改调试配置,但我能看到的唯一虚拟设备target
是旧的模拟器(见下图)。
If in target
i follow this answer, I get the following error :
如果target
我按照这个答案,我会收到以下错误:
[2014-01-30 19:50:00 - HelloWorld] No active compatible AVD's or devices found. Relaunch this configuration after connecting a device or starting an AVD.
Moreover I followed the FAQsthat suggests how to bing the SDK. I show my configuration in the second photo.
此外,我遵循了建议如何绑定 SDK的常见问题解答。我在第二张照片中展示了我的配置。
The devices shown in the photo are all made with AVD, there aren't the one of genymotion and neither the one that is running:
照片中显示的设备都是用 AVD 制作的,没有 genymotion 和正在运行的设备:
Here I put the configurations of genymotion:
这里我放了genymotion的配置:
How can I say to eclipse to start the genymotion emulator and not the AVD one?
我怎么能说 eclipse 启动 genymotion 模拟器而不是 AVD 模拟器?
回答by eyal-lezmy
Looking at your screenshot I think you should unselect all the AVDs displayed on the list. The option you chose launches the best selected AVD by default, and optionally a device.
查看您的屏幕截图,我认为您应该取消选择列表中显示的所有 AVD。您选择的选项默认启动最佳选择的 AVD,以及可选的设备。
Also, the Genymotion instances are considered as real devices by ADB and ADT. So, as GhostDerfel mentioned, you need to run one of them before running your app on Genymotion instance.
此外,ADB 和 ADT 将 Genymotion 实例视为真实设备。因此,正如 GhostDerfel 所提到的,在 Genymotion 实例上运行您的应用程序之前,您需要运行其中之一。
To know all the detected devices by ADB you can look at the "Devices" section of DDMS. If a Genymotion device is detected, it should show a name like this : genymotion-galaxy_s3....
要了解 ADB 检测到的所有设备,您可以查看 DDMS 的“设备”部分。如果检测到 Genymotion 设备,它应该显示如下名称:genymotion-galaxy_s3....
You can also run this command adb devices
. The result should show something like this:
您也可以运行此命令adb devices
。结果应该是这样的:
List of devices attached
192.168.56.102:5555 device
Each Genymotion machine is listed by its local IP address here.
每台 Genymotion 机器都在此处按其本地 IP 地址列出。
If you can't find your Genymotion instance(s), check that you have the lastest version of Genymotion. A ADB detection bug has been fixed on the release 2.0.2
如果您找不到您的 Genymotion 实例,请检查您是否拥有最新版本的 Genymotion。ADB 检测错误已在2.0.2 版中修复
回答by zerone.01
I had the same problem, i solved it by closing Genymotion and starting it from Genymotion Virtual Device Manager in Eclipse
我遇到了同样的问题,我通过关闭 Genymotion 并从 Eclipse 中的 Genymotion 虚拟设备管理器启动它来解决它
回答by zerone.01
i also had this problem and all tried all the above solutions and still was not working.but finally i read in the genymotion manual that u can simply drag and drop ur apk to the device and it will load and run.so i tried that and not only it worked it also seemed to solve the path problem also so that when ever i run the project it will automatically detect my device created by genymotion.
我也遇到了这个问题,所有人都尝试了上述所有解决方案,但仍然无法正常工作。但最后我在 genymotion 手册中读到,您可以简单地将您的 apk 拖放到设备上,它就会加载并运行。所以我试过了它不仅有效,而且似乎还解决了路径问题,因此当我运行该项目时,它会自动检测由 genymotion 创建的我的设备。
回答by Victor Kushnerov
I can resolve by connecting a real device one time.
我可以通过一次连接真实设备来解决。
回答by Naveen Kumar Yadav
You need to install the genymotion plugin. In android studio File>Settings>Plugins>Browse Repositories > install genymotion plugin. once installed a genymotion button should appear in android studio.I hope that helpfull for you.
您需要安装 genymotion 插件。在 android studio File>Settings>Plugins>Browse Repositories> 安装 genymotion 插件。一旦安装了genymotion按钮应该会出现在android studio中。希望对你有帮助。