Setting up multiple emulators on Android Eclipse - android

I am running a performance test for my android application, want to know whether it is possible to run multiple emulators at once in Eclipse?
If yes, how do i go about doing it?

Create multiple emulators
Change android project run configuration, target as manual selection instead of auto.
Right click on android project -> Run As -> Run Configuration.
On Run configuration window select the project under Android application [at right panel]
Then select Target tab at left panel, and select manual option. that all..
Now whenever you run that selected project, the eclipse will pop up the window with list of running emulators and devices..
To run more than one emulator
1. Open AVD manager
2. select emulator
3. click on start -> launch

You can run multiple emulators by just calling run again, then in the panel "Android Device Chooser" you can choose another Android Virtual Device. To add new Android Virtual Devices to your Android virtual device manager, just click the device manager button on the bar at the top of eclipse, then in the next screen click new and create a new virtual device. The virtual devices go kind of slowly if there are many of them, but you can use multiple emulators this way.

Open AVD Manager. Create multiple AVD/emulator and run them.
Got to the link for help http://developer.android.com/guide/developing/devices/index.html

Related

How to change target emulator in Android Studio?

I have several genymotion emulators for different API levels. The problem is this:
I run the app on a single emulator with the option 'same device for future launches' checked.
I open another emulator.
I run the the app again.
After this, the app only runs on the first emulator and I can't figure out how do I show the dialog (select target) again to run the app on both emulators.
Click Run → Edit Configurations...
Then uncheck Use same device for future launches
As mentioned by #B-GangsteR, you can also launch your app on multiple devices at the same time. To do this, select targets using ctrl key.
Note that even if "Use same device for future launches" is unchecked, you can't launch app on other device while it is still running on first device. So you've got to
terminate app on first device before running on another device,
or kill adb process (it will restart),
or run your app on multiple devices at the same time from the start (when choosing target, select multiple targets using 'ctrl' button or 'ctrl' + A)
In Android Studio 3.5 or above, the "Deployment Target" part of the configurations dialog has moved into the main toolbar.
Click Edit config beside run app.
Close the existing running app in all emulators to have this option even if the problem persist after doing configuration changes
You can change profiles by going to "Run" -> "Run..." -> "1.app" (click on the arrow) -> "Profile", then choosing which device (virtual or physical) you'd like to run on. This took me a while to find and I couldn't find anything like it in the answers above, so hopefully, I help someone out.
You can hold ctrl to select multiple devices (mentioned by #B-GangsteR).
In Android Studio 3.5, need to click on the Emulator name which is the left option of Run 'app' button.
You can select specific Emulator of your choice or multiple Emulator as well.

Genymotion: how to load apk every time?

I'm getting started with Android development and with Genymotion. It's difficult to get Genymotion to install a .apk and run it more than once. Here's what I'm doing:
Begin with Genymotion running.
Press Genymotion icon in Elipse.
See Genymotion Virtual Devices Manager. Note that State of my VM is on
Create a new Android Project
Press the green Run button
See Run As dialog. Select Android Application
See Android Device Chooser. Select Genymotion_nexus_one
See hello world app run. Press GM home button
From here if I change the app, it's difficult to get the app to re-display in the emulator:
Drag a button to activity_main.xml. Save.
Press the green Run button
Nothing happens
To get the app to re-display requires jiggle the Handle type actions:
If I Clear the console log or bring up the GM Virtual Devices manager, before I press the Run button, the app will generally display in Genymotion.
Any ideas how to make Genymotion behave without Jiggling the handle?
I'm running the latest SDK: 20131030 on OSX 10.7.5
Drag drop apk on Genemotion emulator ,it will automatically installs and creates a shortcut.enjoy.
run in command-prompt :
adb install your_app_name.apk
:-)
Solved:
Since installing the adt-bundle-mac-x86_64-20131030, I'd never right-clicked the Run button to display the drop-down menu there. Having done that once, pressing the Run button now brings up Android Device Chooser every time (as it should).
When I first ran into this problem, I reinstalled adt-bundle-mac-x86_64-20131030 and Genymotion. I saw no change in behavior. This appears to be a minor bug in this version of adt-bundle-mac-x86_64-20131030
In Android Studio, if you run your project (shift+F10) when Genymotion virtual device is running; you'll see the device in connected devices list in Select Deployment Target window.

Eclipse Android Emulator not working on Microsoft Surface Pro

I cannot get an Android Virtual Device to launch on my Surface Pro. I have had no problems on Windows XP, 7, or OS X.
I have tried launching from the AVD Manager, it opens the option dialog and when I select launch it acts like it is working, however the emulator never shows up.
When I select Run As Android Application from a project it acts like it is starting, once again nothing ever shows up.
Either way I get no error messages in the console.
I have tried disabling UAC.
Thanks for your help.
Right-click the program's icon and choose Properties.
When the Properties dialog box appears, click the Compatibility tab and then click the Run Compatibility Troubleshooter button.
Windows 8 tries to guess what version of Windows your program needs, and then it applies the changes. If the program begins working, you're through.
If the program still has trouble, though, move to Step 3.
In the Compatibility Mode section, select the Run This Program in Compatibility Mode For check box and select the program's desired Windows version from the drop-down list.
http://www.reddit.com/r/Surface/comments/1ael60/surface_pro_and_dj_software_also_android/
Please refer to my question and answer here:
< Android Emulator and AVD will not run on Surface Pro >
As it turns out you can run the Android Emulator and AVD on the Microsoft Windows 8 Surface Pro.
You will need to rollback the graphic drivers:
< http://answers.microsoft.com/en-us/windows/forum/windows_8-hardware/latest-graphics-driver-update-makes-bluestacks/1f67d99f-3626-4110-aa22-773856b226cb > Method 1: I would suggest you to roll back to the previous driver.
a) Press Windows key + X on the keyboard.
b) Click Device Manager.
c) Double-click on Display Adapters.
d) Double-click on your Graphic Card Drivers
e) Select the Driver Tab
f) Click on Roll Back Driver.
I still recommend using Bluestacks as an alternative method for Android Emulation.

Use same android emulator every time

I have started a new emulator from 'launch new emulator' . But when I run another project later another emulator is getting loaded . Actually I wanted to use the same emulator itself.I there any option to reuse the same emulator and prevent new emulator being launched automatically.
Instead of Run use Run>Run Configurations>Target>Manual and manually select the AVD that is already launched.
I often have this problem when i both have the physical device( a real phone) plugged in the pc and an emulator. You can put the devices list near the console and logcat views, so you can select here the right device to use (install the app and show the logcat).
Go in window -> show view -> other -> devices.
From there you can select which device to use (if nothing is selected, a new emulator is run following the target option you set following Mangusto's answer)
You can select the emulator that you wish to make default from windows->android sdk manager->
edit the virtual device from that you can select skin you want. or set the dimension.
I think this can help you
Go to Run > Edit Configurations, choose your run configuration on the left side, check Use same device for future launches checkbox.

Start two Android emulators with different locale

Most of the idea is in the title, I just would like to know if it is possible to start 2 emulators at the same time with 2 different locale (to test the I18n of my app). If there was a way of doing it in Eclipse, that would be greater...
Something like
If you click the Button for starting the emulator in Eclipse (the litlle mobile phone) Eclipse should open a dialog that lets you choose which android virtual device (AVD) you want to start. You can create a second AVD in this dialog and then start them both after each other.
Now you have to change the locale of one of the emulators to the wanted language. The emulator should save this settings so you have to configure this only once.
In Eclipse, this is easy to do. Use the Android Virtual Device (AVD) manager to set up as many emulators as you want. Depending on whether you've updated to the latest version of the Eclipse plug-in, the button to launch the AVD manager will either be a black phone or the Android Robot's head above a black square with an arrow in it. Either way it's in the toolbar near the shortcuts for Save, Print, etc.
In the AVD you can create various emulators with different Android versions (download other SDKs in the 'Available Packages' menu in the left). Once you've created the emulators, start them with the button on the right. You can have multiple emulators running at the same time if you want. The emulators have a program installed on them already called 'Custom Locale' that lets you change their location information. You can't do this while creating the emulators, but it's saved when you do in the emulator so you don't need to do it every time.
After that, to choose which emulator your program will run on, change its run configuration Target to manual. This is done by clicking on the more options arrow next to the green 'Start Program' button, selecting Run Configurations, the Target tab, then selecting manual. You can also do this by right clicking on your project in the project browser (list on the left), and the option is under 'Run As' -> Run Configurations.
To connect adb to a particular emulator or device, use one of the options "-e", "-d" or "-s " as documented for the ADB tool.
http://developer.android.com/tools/help/adb.html
In general the documentation is a great place to start.

Categories

Resources