How to change Android emulator path in Visual Studio 2017 - android

I've been trying to develop a mobile app in visual studio 2017 with Xamarin. Everything was going fine until I noticed a message in the output window that my Android emulator is out of date. I followed the instructions to update and now I can't debug. I get the following messages in the output window:
Emulator Android_Accelerated_x86_Oreo cannot be started
PANIC: Missing emulator engine program for x86 cpu
I read somewhere that, in the new version, the emulator path changes from C:\Program Files (x86)\Android\android-sdk\tools\emulator.EXE to C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE. I cannot find an option to inform visual studio of the new path. Nor can I get the Xamarin Live Player to pair with my phone. Any help would be appreciated

Open up powershell and run the same command line the emulator starts just fine:
PS C:> & '.\Program Files (x86)\Android\android-sdk\emulator\emulator.exe' -partition-size 512 -no-boot-anim -avd Andro
id_Accelerated_x86_Oreo -prop monodroid.avdname=Android_Accelerated_x86_Oreo
HAX is working and emulator runs in fast virt mode.
emulator: Saving state on exit with session uptime 5803 ms
And if I press F5 in Visual Studio while I have the emulator running (started via powershell) it connects fine to it and loads the application.
https://developercommunity.visualstudio.com/content/problem/252854/unable-to-start-android-emulator-from-within-visua.html

Related

Android emulator suddenly stopped to work

I am developing an app on Visual Studio with Xamarin. Yesterday emulator was working fine but it stopped to work suddenly without no reason.
Here is error message from vs console:
Starting emulator my_device ...
C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -partition-size 512 -no-boot-anim -avd my_device -prop monodroid.avdname=my_device
Failed to open /qemu.conf, err: 2
HAX is working and emulator runs in fast virt mode.
C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-i386.exe: error while loading state for instance 0x0 of device 'goldfish_pipe'
deleteSnapshot: for default_boot
emulator: INFO: QtLogger.cpp:68: Critical: UpdateLayeredWindowIndirect failed for ptDst=(1113, 122), size=(300x21), dirty=(300x21 0, 0) (Sisteme bağlı bir aygıt çalışmıyor.) ((null):0, (null))
Go to AVD manager
Try Wipe Data or Cold Boot Now options.
Most of the times, this error is caused when the system tries to draw something like app borders/edges etc and when it fails, it throws following error of UpdateLayeredWindowIndirect Failed
Therefore, it is highly related to graphics, so, try changing your Emulated Graphics in
AVD configuration --> Emulated Performance --> Graphics: Software
Please note that if you are using Google PlayStore API for Android SDK then you might not be able change this setting, therefore, if you are unable to change option of Graphics to Software, please create virtual device without PlayStore

Android - emulator-x86.exe has stopped working

My problem : I am using a less speed internet so when i reinstalled my windows 8.I Copied the sdk and .android folder to avoid installing updates.I installed the fresh android studio and linked the sdk and .android folder using environment variables.
When i tried to run my android app it shows the error "emulator-x86.exe has stopped working"
In event log : D:\android\sdk\tools\emulator.exe -netdelay none -netspeed full -avd Nexus_5_API_23
Note: The environment variable $ANDROID_SDK_HOME is set, and the emulator uses that variable to locate AVDs.
This may result in the emulator failing to start if it cannot find the AVDs in the folder pointed to by the
given environment variable.
ANDROID_SDK_HOME=D:\android\sdk
What i Tried :
1. reinstall intel haxm
2. tried low resolutions
3. created new virtual device
4. RAM size reduced to 512 mb
System config:
I refereed the following :
Emulator-x86.exe has stopped working in android studio
emulator-x86.exe has stopped working after lauching
Android studio: emulator-x86.exe stopped working after creating the window for the emulator
emulator-x86.exe has stopped working
By unchecking Use host GPU i solved my problem .. i created a video for the same https://www.youtube.com/watch?v=Bt6QN6-nGEA

How to run Android Emulator from Shell on Ubuntu Server

I installed Android SDK and JDK on Ubuntu Server 14.04 x64. But when I run the AVD, I got
error: 'SDL init failure, reason is: No available video device'
I follow this https://stackoverflow.com/a/6965679
sudo apt-get install ia32-libs
but didn't work.
Should I install any desktop on Ubuntu Server?
Try to run emulator without GUI following these steps:
From: http://paulemtz.blogspot.com/2013/05/android-testing-in-headless-emulator.html
Then, to run the headless emulator:
emulator -avd test -no-skin -no-audio -no-window
The '-no-skin' option removes the emulator buttons such as the home and other hardware keyboard buttons.
The '-no-audio' option disables the audio support.
Finally, the '-no-window' option disables the emulator's graphical window display.
Note that -avd test would need to be modified to refer to your specific emulator image (AVD).
You cannot run an emulator on the Server version of Ubuntu. The Emulator requires a GUI. Which the Server OS does not possess.
Rather use an Ubuntu Desktop OS
Then network your Server and Desktop, get the APK and upload it.
If you still wish to use Ubuntu Server with a GUI, refer to this, and repost the question with Ubuntu Server tags.

Launch Android emulator on console (without graphic desktop )

I'm trying to run android emulator on terminal I have downloaded android sdk on VM ubuntu server (Thus I dont have graphic desktop, only terminal console).
I want to run emulator on terminal as a service that I can use for install App and run some tests(battery consumption, install, others).
I want to create some AVD and run test scripts on it.
But, I cant launch emulator without graphic desktop. Is it possible?
I find that it's possible start Android Emulator without graphic with this command:
$emulator -avd <avd_name> -no-window
Also you can add other commands to clean data on emulator
$emulator -avd <avd_name> -no-window -wipe-data

Android Emulator - Ubuntu 14.04 - Screen starting up Black

Hey I am using the Android SDK API level 21 (lollipop) on an Ubuntu 14.04 system.
I have installed QEMU and enabled hardware virtualization on my machine (KVM up running and registered), but whenever I try to start the AVD that I created using the SDK manager the instance never provides me with an android home screen, it just stays black.
CLI Command: emulator -avd heyholetsgo -debug-all -qemu -enable-kvm
Paste bin of logcat: http://pastebin.com/NYSZdvSP
Any help would be awesome!

Categories

Resources