Android Studio - nonexistent device visible as Connected - android-studio

When I want to Run an app in my Android Studio, there is some weird phone (Motorola XT1052) shown as "connected". And I can even run an app on that device. However, I don't have and never had such phone. I don't have any phones connected via USB, and this Motorola is visible all the time, even after restarting the computer.
I used to have "ADB WIFI" plugin and I thought that it might be the cause, however, after uninstalling it, the device is still visible. How can I delete this device?
I'm having problems with emulator in general, I can't run any app as it always hangs on "waiting for target device to come online", so I wonder if that weird ghost phone might be the problem, since no other solution helped me with the emulator.

I finally got is so I figured I'd share what I've found out.
Look for some other emulators that might be running. In my case, it was a program called Bluestacks. Turns out you can actually install your own apps on it through Android Studio.

Related

Screen Capture on Android Studio Emulator

I'm trying to screenshot on an Android Studio Emulator Pixel 4 XL API 30,
but whenever I try to take one, the Emulator ends itself.
And then I get the message "Lost connection to Device".
Could anyone tell me if there is a way to solve this problem?
__
I tried changing the saved folder, and restarting the emulator
I can't seem to reproduce the error.
But try the obvious: a cold boot of the emulator, and if all else fails, create a whole new emulated device. I frequently encounter weird bugs in the emulator that I solve with a hard reset.
This may be of use to you as well:
Taking screenshot on Emulator from Android Studio

How can I find out why Android Auto in developer mode won't connect to the "Desktop Head Unit"?

I am attempting to get car_app_library hello world example to run through android auto to the DHU.
I have two different workstations with Android Studio and the DHU 2.0Beta. I have two different Android Devices, a Galaxy S9+ and a Galaxy Tab S6.
With any combination, with ADB and DHU running, locally on the devices at best, I can get a full white screen to flash which disappears, and no connection from there.
On the device, I have enabled unknown sources in Android Auto, and I have started "Head Unit Server"
On the workstation, DHU simply indicates at all times, "Waiting for phone...".
Studio "Run" indicates "success, operation succeeded" but nothing happens.
I finally got this working after two days. I could tell when it was not working that 1/5 times I'd see a flashed screen prompting for bluetooth and to continue, but I could not click any buttons in time.
Finally,
I uninstalled the "Android Auto for phones" application on the device, and I think this was the real solution
I also moved to canary channel for studio, and then needed to uninstall and reinstall the desktop head unit.
After this, I could get the screen to show that I saw flashing before, and I had to accept it once, then it crashed again, then I started it all again, and it is finally working.

Android Studio recognises device, but not able to run code

I am using an old smartphone as a device to run my app on in Android Studio. I recently switched to a new computer, so I reinstalled AS on that computer according to the docs. Android Studio recognises my device, but I'm nota ble to run my (Flutter) app on it, and the name of the device is marked with a small green dot.
I'm not entirely sure if that was the problem causing this, but AS said that my Dart SDK was not installed. After installing and restarting, I was able to use a device to run my Flutter app.

Android Device Monitor turning Emulator OFFLINE

Yesterday, Android studio ran a few updates and thereafter, whenever I start Android Device Monitor (ADM), it put my emulator to OFFLINE and I cannot access it even after killing the ADB server and restarting it.
Until I start ADM, everything is fine; when I run the ADB Devices, I see the emulator online but the moment I start the ADM to pull the database out, it goes to OFFLINE.
This is what I did to troubleshoot:
ran adb kill-server
ran adb start-server
reset Android studio by deleting the setting folders
restarted the WINDOWS
but nothing helped by far and any help would be greatly appreciated.
This is on Android Studio 2.2.3
I had the same problem.
I opened the ADM before launching the emulator.Then, I launched the Emulator together with the app not before.
Now the emulator is online.
I have given up on trying to figure out what is going on with ADM. However, what I am currenly doing is, I have also installed the Canary version of Studio 3.x from here https://developer.android.com/studio/preview/index.html and everything works just fine with it. I can even pull the database from the device without having any problem. They both run side by side without having any issues on my Windows 7 work desktop.
The only downside of this, having to install both versions but as long as you have 16GB ram you should be fine. That is what I in my PC. Hope, this helps!

Android Emulator failed to launch, might caused by not supporting extended desktop

I have been frustrated with Android Emulator for weeks after using x86 emulator. The emulator showed with blank screen for hours even if the LogCat indicate it is running, but I am afraid the application was trapped in a dead loop.
To correct this problem, I have re-installed all my computer and android developing environment, and follow every instructions I could get by searching the internet; while the result was frustrating: there was only one "system_process" running on the emulator.
Then today I noticed there is a SystemUI error, thus I guess if this is caused by the PC configuration when I was using extended desktop. So I detached my laptop from the dock and re-launched the emulator, this time it cost only about 10 seconds to get all the processes ready to simulate android phone.
So I guess there is a bug to handle PC with extended desktop enabled. If you have got similar problem when launching Android Emulator, please try detach your PC from the second display first.

Resources