Eclipse Android Emulator not working on Microsoft Surface Pro - android

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.

Related

Unable to turn on "Snapshot" in Android Studio AVD Manager & save it

Android Studio 2.1.3 on Windows 10 64 bit.
I go to Tools->Android->AVD Manager.
It shows me an error "Android Virtual Device" failed to load - click Details to see the error.
When I click Details, it does not show any error.
When I click on Edit & try to turn of "Host GPU" & turn on "Snapshot" option, the OK button remains grayed out - so I cannot save the Snapshot Option.
The emulator itself runs fine - however, how do I turn on the Snapshot option.
Try going to your SDK manager and making sure everything is updated. Your options are slightly different and I believe it's because you are using an older version.
They now have the Emulator Accelerator. You can also select to run off of your hardware and choose the number of Cores from your CPU to assign to the virtual device.
accroding to this image http://imgur.com/cWqmDgH you have not set skin ..so please choose skin option then you will be able to see ok button

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.

"Hardware Section" is missing under Android Virtual Device Manager

I was trying to fix my problem "hardware buttons not enabled in AVD" after an hour research
all I found was people who lead people to go to "hardware section and fix blabla"
but interestingly my AVD doesn't have this section.I actually found some of options under Device Definitions but still couldnt fix my problem nor found this menu.All screenshots I saw had Hardware section...
My specs are; MacOS , Android 4.2.2 (Api17) , Eclipse
P.S:everything else works perfectly .I am just missing this section.
The instructions you were looking at were probably from R20 or earlier versions of the Android Developer Tools. R21 is different and appears to be what you are running. You change the behavior of the hardware buttons on the Device Definitions tab for whatever device is associated with your AVD:
Change the Buttons drop-down to Software or Hardware depending on what you want the behavior to be.
After lengthy trial and error, I banished the "hardware buttons not enabled in AVD" problem by discovering that there are at least three distinct 'gotchas' that must be set properly. I am using Eclipse Java EE Juno with ADT version 22.3.0 (latest as of 2013 Nov 3).
In summary, it's a bit awkward to figure out the first time, but simple thereafter. The virtual device definition must include 1) hardware buttons, 2) the device definition must also be chosen in the AVD selector drop down field, and 3) the box must be ticked for displaying a skin with hardware controls. All three are critical. Step by step:
Window → Android Virtual Device Manager (See screen capture below) (NOTE: If not visible in menu, choose Window → Customize Perspective and tick Android SDK and AVD manager - but assume this has already been done if you have gotten far enough to get the above error message)
Click the first tab, which is Android Virtual Device, click Edit, and note the name of the Device listed in the second combo box field from the top. This is going to be either a built in default Android virtual device definition, or a custom one you have created (or will create) from scratch. Make note of this Device name and close Edit Android Virtual Device edit window by clicking "OK"
Click the second tab in Android Virtual Device Manager which is Device Definitions and select the device you remember from step #2 above from the list (Note to emulator developers - this setup step is slightly more awkward than necessary - perhaps tabs one and two could be tied together more closely to allow double clicking a device and editing it directly instead of having to close a tab then opening another). After selecting the virtual device definition, choose Edit (or Clone if the device you want to edit is a built-in definition because if it is a built-in device, it must be saved as a cloned copy once edited. Name the cloned device something memorable in the top left field of the Clone Device window, e.g. add "_hardwareButtons" to the end of the default name).
IMPORTANT: Edit the cloned device: Ensure that Buttons → Hardware is chosen on the right hand side, fourth field down, of the Edit Device (or Clone Device) window (from step #3 above under Device Definitions tab). This is critically important or the Hardware buttons will not be active. This is the most likely root cause of the above error message. It's OK to leave Input as No Nav unless you want to use the virtual DPad. Click Edit Device (or Clone Device) at the bottom right of the window to save your changes.
IMPORTANT: Inside Android Virtual Device manager, click first tab again, which is Android virtual device. Select Edit and ensure that the newly edited, created, or cloned device is selected by name in the Device field drop down combo box (second from top) of the AVD. (see top two screen captures above). It is critically important that the proper device is chosen here, because creating a newly cloned device does not automatically update, or associate it with, your AVD (see my comments to emulator developers above).
IMPORTANT: Also inside the same Android Virtual Device edit box, Make sure Skin → Display a skin with hardware controls is ticked. This is also critically important or you will not see any hardware buttons at all. Click "OK" to close Edit window.
For good measure (possibly unnecessary) I clicked Refresh in the first tab (Android Virtual Device) of AVD manager and looked to be sure that a green checkmark was in front of the AVD I just edited. If not, it's probably because the newly edited device is not yet connected with your AVD. Click Edit and again choose the proper newly edited device name. Click "OK" to close.
In addition and optional for the truly paranoid, you can click Details under AVD first tab and expand the window to look at your device definition specifics. Make sure that skin.dynamic is yes, hw.keyboard: is no (unless want keyboard) and hw.mainKeys: is yes and hw.dPad: is no (unless want dPad) and, as always, ensure that you have the proper device name chosen.
Now you should have a perfectly viable AVD defined that you can use in the RUN → RUN CONFIGURATION Eclipse menu and it will not display the dreaded "hardware buttons not enabled in AVD" error message.
In Eclipse, RUN → RUN CONFIGURATION, choose your app name from the left hand side (and make sure it also appears under Android tab) and that the newly defined AVD is ticked under the Target tab and click RUN. (or CTRL+F11 after the first run of any new configuration).
Here are some screen captures from a tablet emulator as an example:

Setting up multiple emulators on Android Eclipse

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

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