Virtual Machine not running over genymotion(stuck on initialization tab) - android

I just started android studio for learning purpose, it has been about a week that I am unable to setup android studio properly to run.
However I tried every possible solution to make it run, which includes
Setting up SDK properly
Setting Virtual Devices to low resolutions
Went for genymotion to make it run
Setup AVD properly according to what i seen on this site
Therefore, now switching to Genymotion and setting up all the things properly(e.g Virtual device path, Making Virtual Device), I'm unable to make it run through Android Studio. When i open Genymotion Device Manager(through Android Studio), there is device present which i created in Genymotion, after that when I hit Start button it just stuck on the following "initializing VD" tab
I have waited for this to complete for 3 hours.
What should i do now?

Turning the Virtual Device ON from Genymotion and running it directly from "run selected configuration" from android device worked for me. However turning device on through genymotion device manager still doesn't worked but I made my app run anyhow. Thanks

There used to be a bug in Android Studio startup script (caused by the way it setup the LD_LIBRARY_PATHvariable, see https://youtrack.jetbrains.com/issue/IDEA-171503). This has been fixed in Android Studio 3.1. If you are using an older version, updating should help.

Related

freshly installed Android Emulator keeps saying settings, google has stopped working in Parallel Desktop

I am using windows in Mac Pro. In Windows Parallel Desktop I am keep on getting error message in Android Emulator like:
Google has stooped working
Settings has stopped working.
Pixel Launcher has stopped working.
Getting error message in freshly installed Xamarin tools in Visual Studio.
Googling suggested to clear the cache or force stop it, but nothing is working
For now I installed Android Studio on Mac and running project on Windows. By Following below link I ran few commands and Windows able to communicate with MAC
https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/questions/connect-android-emulator-mac-windows
Not sure if this is right way. But running virtual device inside virtual machine is giving some problem.
Above thing is working fine. Let me know if there is any other best solution for this.

Android Studio not detecting Microsoft Android Emulator

I installed Microsoft's Android Emulator from here which can now work without disabling Hyper-V on Windows 10. I was following the instructions in this post and everything was working smooth until yesterday. I was successfully able to debug my app in MS android emulator.
Today morning I closed the emulator and started it again. Now, When I start running the app to test it then the MS Android emulator is not showing up in Select Deployment Target window of Android Studio as below. Nexus 5X API 28 emulator visible under Available Virtual Devices is Google's Android emulator which doesn't work with Hyper-V enabled due to reasons mentioned here.
I've already launched the MS Android simulator and it is up and running:
I can see it running in Hyper-V as well as shown below:
Not sure what happened suddenly and it stopped working altogether. Can anyone suggest me the reason behind it or I'm missing something?
If it didn't detected by IDE, try to rerun the emulator and check if it is detecting again or not.
Also, you can try this too:
Tools -> Android -> Enable ADB Integration
If it is already enabled, try to disable and re enable it, seems like this works most of the times.
EDIT: You may want to check:
https://stackoverflow.com/a/38788436/4409113
Changing the value Path then running following commands:
adb kill-server
adb start-server
Might help.
I happened to resolve it by chance. Sharing my experience in case it helps someone in future.
Initially what I was doing is as below:
Start Visual Studio Emulator for Android application which contains the list all the device profiles.
Choose an appropriate device profile and install it.
Run the installed profile and launch the emulator.
Start Android studio, open the project and launch the app.
I simply reversed the above steps to resolve my issue. First close everything including Android Studio, emulators, device profile window etc.:
At first, start Android studio, open the project and hit Run app button to show Select Deployment Target window.
Now, start Visual Studio Emulator for Android application which contains the list of all the device profiles.
Choose an appropriate device profile and install it.
Run the installed profile and launch the emulator. Wait for the Android operating system to get started fully.
The Connected Devices section in Select Deployment Target window would refresh on its own to start showing Microsoft's Android Emulator.
The adb.exe can be seen as an infected file by antivirius software. So need to exclude once reinstated.

App not run in visual studio emulator for android in visual studio 2015

I create blank xamarin android project without add any code when i debug this project debugging without problem but when i run app with visual studio emulator for android emulator is running but not starting my app and deploy failed and don't show me error
why ?
please help me
I had the same issue. VS 2015 can launch the VS emulator but can't deploy the app.
I was able to solve the issue like this:
Launch the emulator (F5 in VS, then cancel the deployment using the Build/Cancel menu)
Click on the chevron icon (») in the toolbar to the right of the emulator
Select the Network tab
Locate the preferred network ip address
Back in VS, click on the Open Adb Command Prompt toolbar button
Type adb connect [the emulator ip address]
Press F5 again in VS
Looks like a VS bug to me.
I had the same issue. It turned out the root cause was that the VS Emulator couldn't find adb.exe.
When that happens it won't connect to the emulator unless you do the manual connection following the steps CSharpRocks gives. The emulator also won't be listed under "adb devices".
The fix for me was to reinstall the Android SDK, using the Windows EXE based installer (not the zip installer). The EXE installer sets the HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools key, Path value, in the registry, pointing to the Android SDK root directory.
The VS Emulator uses that registry setting (or the Android Studio install registry setting) to find the SDK, assuming you didn't install the Android SDK with Visual Studio itself. With that, it should be able to find adb.exe and work.
Have a look here:
Xamarin Forms Android App Crashes Running Debug with VS Android Emulator
Start the Hyper-V manager
Select the emulator you are trying to use
Right-click, hit settings
Click processor
Click Compatibility
Set checkbox “Migrate to a physical computer with a different processor version”
I'm having a very similar issue. I have found two different kind-of-work-arounds, but have not yet figured out a full solution.
Start the emulator before trying to deploy to it
Launch the Visual Studio Emulator for Android application from the start menu.
Launch one of the available emulators via the green arrow
Attempt to again launch your application from visual studio, selecting the VS Emulator N-inch... emulator from the drop down menu
For me for some reason the app still doesn't "launch" on the emulator, although it is installed. So I have to open the application menu and select my app. Additionally it will usually crash the first several times I try to open it, but eventually displays my single default label, Welcome to Xamarin Forms!.
Run the application in Ad-Hoc mode
Before running the application, change the solution configuration (from the top toolbar next to the green "run" button) to Ad-Hoc.
The problem with both of these methods though is that I'm still not able to actually debug an application. I can run it, but my breakpoints are ignored and I think that will make finding bugs difficult once I actually start to write a real application.
I hope to update this answer once I figure out an actual solution.
I had the same problem yesterday. The problem appeared (probably) because I tried to start development after a long break. I updated VS and everything, but faced many issues.
Eventually you need to start fresh
Make sure SDK for emulator points to the right place (HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools)
Run Visual Studio with Administrator privileges
Go to Hyper-V Manager and delete ALL Virtual Switches - let the system recreate them when needed. It will do it properly
Delete all existing emulators and recreate them in Visual Studio. I even found a comment to name them without spaces - not sure if it is needed, but wouldn't hurt.
Doing all this helped me. But I was on the verge of reinstalling Windows 10 clean. I think lots of things and configuration changed and are no longer compatible.
Try it enabling Hyper-V and using a Visual Studio Emulator from android; that worked for me after a lot of attempts and research
I had the same issue but in my case it was not the registry. After doing a release build, I deployed the app to the emulator device in release mode which pushes the app to the device and then effectively "disconnects". This leaves a version of the app on the device which seems to block further attempts at debugging or deploying.
I solved it by starting the emulator, going to "settings -> apps" and manually uninstalling my app. Then the next debug build & deploy worked again.
You could probably also manually start the emulator and say "wipe device" option so it starts fresh.
In VS2017, on a Windows10 machine, all I had to do to get the app to show up was turn off Mobile Data.
(swipe down or use settings, then click Mobile Data and confirm to turn it off).
After I turned it back on, I could access the app. Before doing this, it always seemed that the emulator ran, but wouldn't run the app.
... no idea why this worked, but I'm posting it here in case it helps someone.
During my troubleshooting process, I also looked at these articles:
VS Android Emulator wont run application
Troubleshooting the Visual Studio Emulator for Android
Update Your Path For The New Android Emulator Location
Install apache in VS 2015 here.
Visual studio requires apache to develop android apps.
You also may want to look at some other suggestions:
notshowing, troubleshooting
I had such issues before with the android SDK emulator, now I'm using Genymotion emulator instead of it, it is more light and faster and will be detected automatically by you VS once launched.
you can download the free version from here : https://www.genymotion.com/
and also you can download any device emulator.

ADB not responding in Android Studio 1.1 Beta4

I've used to date without any problems from Android Studio, But today I wanted to use this error to the Android Studio.I used to run a virtual machine from GenyMontion
I also refer to the following link but could not solve my issue :
Click to see
Error Image :
Click to see
please help me
I run into this exact problem each time I restart Android Studio or Genymotion during the day. The adb kill/start has no effect and linking Genymotion to the android SDK tools has no effect.
For me, the best way to get back to coding/development is to:
1) Start up another virtual device
2) Run Debug and verify the device shows up
3) Kill it off
4) Start up the virtual device I really wanted
And miraculously the device I REALLY want shows up in "Choose Device, Choose a running device" dialog
Frustrating, but the workaround works.

Android Studio emulator appears in the task manager for 10 seconds and disappears. The emulator window is never displayed

It was working fine till I updated the Android SDK tools from the SDK Manager to version 24.1.2. However a virtual device was running at the time of the update and it asked me to close 3 processes in order for the update to continue. I thought the virtual device was interfering so I closed it and tried to proceed with the update,it gave me the same error. Therefore I cancelled the update and closed the studio. After restarting the studio,it gave an error saying the SDK could not be found and would not let me do anything else. I uninstalled the studio after deleting the SDK folder and reinstalled it. I downloaded the system images needed for the virtual devices and some other packages and created a new virtual device. When I tried to run the application,it gave me the dialogue box to chose the virtual device,I chose the newly created one and it gave the command to start the device. Yet no emulator window for the device appeared.
D:\sdk\tools\emulator.exe -netdelay none -netspeed full -avd MTK
emulator: device fd:5500
HAX is working and emulator runs in fast virt mode
HAXM is installed and it worked fine before. On checking the task manager upon launching the application,an emulator-x86.exe process appears briefly before disappearing. Nothing happens after that. Launching the program again gives the same result. If I try to launch the device from the AVD manager,I get the same result. I have tried using the arm images,varying the ram size,snapshot enabled/disabled,use HOST GPU enabled/disabled,system restarted,removal of /.android content,setting up the SDK in a different drive and deleting the ANDROID_SDK_HOME system variable and resetting it.
I have also tried with Genymotion. The virtual device window briefly appears and I can the see the android logo at startup but then it says "player.exe has encountered a problem and needs to close. We are sorry for the inconvenience." I have tried it using both the Genymotion Android SDK tools and the custom Android SDK tools to no avail. If I try to delete the device it says please stop the virtual device before deleting it even though it is not running.
I spent most of my day trying to solve exactly the same problem until one of my colleagues remembered he had exactly the same issue and that was related to Docker.
Docker uses Hypervisor Framework which is incompatible with the HAXM used by the Android emulator. Therefore if you try to run the Android emulator while Docker is running it will just quit without a warning. Quitting Docker will allow to use the simulator - Docker for Mac conflict with Android emulator
Sometimes it is because you are low on memory, or it might be an AVD specific glitch. I had many (20) devices saved in my AVD and was lower than normal on memory on my laptop. The native emulator folder would disappear right away but genymotion worked fine.
I removed the old devices and create a new one from scratch in AVD and the problem disappeared.

Categories

Resources