3

i've been trying to develop an Android application for some time now but the problem i keep facing is finding a suitable emulator to run a demo of the application (I think the default Android SDK emulator is crap). Anyway i did some research and came across the genymotion android emulator which is faster than any other emulators i have tired so far. I then went on to search for a plugin for my Mosync IDE which is an IDE built on eclipse that allows you to develop native, web or hybrid apps using htnl5, css, javscript, c/c++. Anyway i installed the plugin with the MosyncIDE the same way you install any new software in any eclipse based IDE and it installed fine. The problem i have now is that i am able to run the emulator okay but when i try to run my application inside that emulator i am unable to locate the genymotion virtual device in the list. I have been fiddling with my configuratin settings for days now without any results, i do not own an android phone so testing it directly on one is not an option for me, i would like someone to help me out with this problem thank you.

Please note that i am able to run the app normally with the default androidsdk emulator.

[What i have been trying soo far] This is what i do currently, i start the genymotion emulator within the IDE. I go to run configurations. I choose Android Emulator. I hit "Refresh AVD list" Then i choose the android emulator i want from the list, the problem is i can't find the genymotion emulator i started within that list.

Blank EDjok
  • 732
  • 2
  • 14
  • 33
  • Did you try to run `adb devices` to know if ADB is connected to the VM you started when the problem occurs? – eyal-lezmy Sep 17 '13 at 20:55
  • technically there is no need to special plugin for eclipse or Mosync to work with genymotion emulator. (genymotion is android compiled for x86 in a virtualbox ) If adb is properly installed in genymotion, you should see the genymotion emulator in `adb devices` command. maybe trying the `sudo adb kill-server && sudo adb start-server` is helpfull. – hich9n Sep 18 '13 at 11:26
  • Yeah i tried and adb is connected, i think my problem is i may not know how to run my application with the genymotion emulator, do i just click on run? – Blank EDjok Sep 18 '13 at 16:56

2 Answers2

2

Ok. The thing is that Genymotion device is not considered as an emulator but like a real device plugged on USB. You won't find it on the AVDs list but on the "running Android devices".

You first have to check if the running Genymotion VM is connected TO ADB: Run adb devices on a console. It should show you something like this:

List of devices attached
192.168.56.101:5555     device

The Genymotion device is shown as it's IP address. If the Genymotion device is shown on this list, it should also appear on the list of available devices when you hit the "run" button of your IDE. Like in this picture (done with Eclipse IDE). enter image description here

If it is not shown on the list, read my previous answer.

eyal-lezmy
  • 7,090
  • 3
  • 41
  • 35
  • Well thatz the problem i'm having, the android device chooser doesn't pop up, it just runs the emulator straight away, sorry i'm just getting familiar with android development. – Blank EDjok Sep 19 '13 at 15:23
  • Ok so that means you asked it to run AVD by default. First check the `adb devices` command to be sure it is connected. Then open your "Run configurations" windows, select your app's configuration, you will find a "Target" tab where you can select what behavior you want to have when debugging your app (launching an AVD and/or prompt to pick device). – eyal-lezmy Sep 19 '13 at 16:04
  • Okay i've seen what is happening now, i couldn't find target in the mosync ide but i found it when i opened eclipse juno. I thought mosync was built on eclipse? i'm developing a cross platform html5/javascript app. – Blank EDjok Sep 19 '13 at 16:45
  • Yes mosync is based on eclipse. You can find the way to send your app to an Android device on this page I think: http://www.mosync.com/docs/sdk/tools/guides/ide/sending-to-device/index.html – eyal-lezmy Sep 19 '13 at 19:15
  • 1
    Thank you soo much for you time, i finally got it to work you have been of great help to me. – Blank EDjok Sep 20 '13 at 11:28
  • Hi Blank EDjok, can you please let me know how was it that you solved this problem. I'm having the same issue. I cant seem to be able to choose a running device from MoSync and can only launch the emulators. – Renato Mar 10 '15 at 19:26
0

So you installed the Genymotion Eclipse plugin isn't it? And it seems that adb devices does sometimes not display your Genymotion device.

When the VM boots into the Genymotion player, it executes:

adb connect <VM's IP address>

This connects the device to adb, so you are able to debug your apps with it.

Sometimes, it appears that the connection is lost and you have to run adb connect <VM's IP address> again. You have to do it manually for now.

You can get the IP of your running device using the Genymotion Shell with the command devices list

eyal-lezmy
  • 7,090
  • 3
  • 41
  • 35
  • 1
    Where exactly do i execute the command? In the command shell? – Blank EDjok Sep 18 '13 at 16:34
  • Okay i checked and adb was running and already connected to the emulator, i think my problem is knowing how to run the application within the genymotion emulator, do i go to run configurations and choose the genymotion emulator from the list of android devices?Coz thatz what i've been doing soo far and i can't locate the emulator. – Blank EDjok Sep 18 '13 at 16:51
  • Yes you have to choose the Genymotion device where you want to test your app. After clicking on run you should get an output console inside the IDE. You should paste the result of this console inside you question (updating it) so we will be able to know more about your problem. – eyal-lezmy Sep 18 '13 at 20:23