Android Studio sometimes fails to launch app on phone from virtual machine - android

I'm using android studio in an Ubuntu VM in Virtualbox on a Linux Mint host.
I'm able to connect my s5 to the vm and compile then launch the app on my phone. However, sometimes (usually after 2 or 3 prior launches) I will select run, android studio will finish building but then nothing happens. The app does not launch but it shows my phone is still connected. The way I have to fix this (as retrying does not work) I disconnect phone from vm, reconnect phone and restart android studio then the app launches on first try. It seems like a problem with android studio since the only way to get out of it is to restart but I'm not sure how to prevent this problem.

i also face this problem but i fix it by reinstalling the app

Related

AVD Crashing qemu-system-i386 quit unexpectedly after MacOS Catalina Update

I have been running Android Studio on my Macbook for over a year perfectly fine. Recently I decided to upgrade to MacOS Catalina. The upgrade went successfully, but when I ran Android Studio again, I've been receiving this error constantly when I try to start a virtual device. Tried cold boot, wiping virtual device data, cloning virtual device, creating a fresh new device,
Even tried this as a solution (found it on the internet).
sudo launchctl remove com.cylance.agent_service
But nothing seems to works. Here's a screenshot of the error
So I found the answer to the weird problem. So apparently Android Studio Emulator works in a weird way. I have a dual monitor setup, so I had opened the emulator on monitor 1 and closed it on monitor 2 and then was trying to reopen on monitor 2. What the emulator does is it leaves some files behind from monitor 1 behind that interfere when it is restarted on monitor 2. So I re-opened it on monitor 1 and it worked. Saw this on some youtube video, didn't believe it'd work, but it did and I forgot I had asked it here as no one replied and I got busy. Now that I know I would like to leave it here, in case someone else has the same issue.

Android Studio emulator closes immediately after opening

When I start an emulator from Android studio, it closes immediately and it shows these messages in the Android studio event log
Previously, I had Genymotion installed, but the problem still occurs after I have successfully removed it (along with Virtual Box) from my computer.
I have VMware on my computer, but this was never a problem for successfully running an Android Emulator.
I have tried all of the proposed solutions on the internet (including reinstall of Android studio, update HAXM...), but nothing works.
Maybe it is due to the fact that your pc doesn't have much memory or disk space to run android emulator.Please check this if it helps.
Check what 'adb devices' shows you.
Seems like you still have some parallel instance running
May be it depends on your computer features.After you open a place where android studio is set up,everything might be okey

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: Running application in emulator not working

Today I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application but weren't able to run it. With adb I can install it without having any problems.
However, if I try to do it with Android Studio, it gets stuck on 'Installing APKs'. The same happens when I try to start it in an emulator (gets stuck on 'Waiting for target device to come online').
My device is a Samsung Galaxy S3 with LineageOS (Android 7.1.2) and root permissions. Android Studio recognizes my phone properly.
What I've already done:
installed openjdk
set android_home
installed all the SDK-platforms since Android 4.3 and Android Emulator from SDK tools
enabled USB-debugging
tried with MTP and PTP
tried another emulated phone
installed lib32stdc++6
restarted my computer
and probably much more
I tried to do it the whole evening and couldn't find a solution. Is there something Debian-specific because I can only find instructions for Ubuntu? I have never experienced anything close to this on other systems.
Thank you in advance.
EDIT: I am now able to use my phone to run the android application by using USB 2.0 instead of USB 3.0! Is that a normal behavior since it works with native adb? I mean, if I buy a new PC after some years which has got only USB 3.0 ports, will I not be able to use phone debugging with Android Studio or is this just an issue? It is still known since 2014 (https://stackoverflow.com/a/9548311/8292104).
However, I still cannot get the app running on an AVD. I changed graphics to software, now it shows the phone but the screen remains black and the phone won't start. What can I do to fix it?
Try to completely delete and install Android Studio again, I think that it will solve the problem
Another possible solution that worked for me is to, in the application, go to
app - build - intermediates - split-apk - debug - slices
and then delete all of the contents within this folder. Then again, this only worked for me, so I would duplicate the document in case of corruption.

Many "Emulator unknown emulator - xxxx [null]"s are redundantly shown in android studio

this is more of a benign bug in android studio. Whenever I wake my computer from sleep or hibernate the connection between the emulator and android studio is not proper and I have to restart the emulator and try again, so as a result of that (I think) all the dead emulators are always shown in the listing when trying to run the app.
And FYI I don't usually restart/shutdown my computer (once in 10 days or so). I was just wondering if there was a way to fix this bug without having to restart the computer.
Screenshot of problem
Thanks in advance!
I am having the same issue using Windows 10 hibernate.
Try terminating the adb.exe process in the task manager. Sometimes you will find two or more adb.exe processes, kill them all. Then close all running emulators (if any) and disconnect all physical devices.
You don't have to restart android studio or eclipse.
After dong this, all unknown/null emulators should be gone (at least in my case).
Did you open multiple android studio and use the terminal in android studio?
you can close all android studio, and restart them. the unknown emulator will be gone

Categories

Resources