Failed to start adb server in Android Studio - android-studio

Environment:
Windows 10 Pro
Android Studio Bumblebee 2021.1.1 Patch 2
Android SDK Platform-tools 33.0.1 (adb)
Firstly I need to mention that the problem happened on one of my laptop. Only this laptop have this issue, which is strange. Also it's not because of the genymotion thing. Port 5037 is not occupied and I've tried all sorts of solutions such as killing adb process and restart, deleting the .android folder, reinstalling everything and so on...
Problem:
Every time I start android studio, it will automatically try to start the adb server. But TWO adb processes appear in the task manager,
and the event log in android studio keeps printing this:
'...\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary
Then it will repeat over and over again.
I've also tried to start the adb server on different ports like 5038, it still doesn't work for most of the time.
However, I did succeed starting the adb server for twice, one after I deleted the .android folder and the other after I changed the adb port to 5038. I don't know why it suddenly worked and it won't be long before it starts to malfunction again, like after several hours.
I still cannot figure it out after a desperate struggle... I'm wondering if anyone has the same situation. If you need further clarification on something let me know. Any help is appreciated!

Recently I found that windows update KB5013942 caused this problem. Uninstalling that patch will solve it. It only happened to certain PCs.

Related

Infinity loading devices in Android Studio

I saw this picture, when open Android Studio few minutes ago (I haven't done anything specific before) - studio infinity trying load device
Please, tell me, how I can solve this problem? If you need some data, I`m ready to take it.
Edit: I tried invalidate cahes and restart ide, it isn`t worked
Edit2: I tried start emulator and get this message
My problem solved [this question]. I just open terminal in sdk-directory, write "adb start-server" and delete all adb.exe in task manager.
1

Why genymotion stopped suddenly and not display? in android java

genymotion when i run it, it's window dosn't display and not openning but when open task manager it's in process
note : it was working but i restarted the PC and tapped on restart any way
This sometimes happens after a Windows system upgrade. You need to remove Genymotion completely and re-install it. Follow the instructions from https://support.genymotion.com/hc/en-us/articles/360002815177-How-to-uninstall-Genymotion-Desktop-completely-purge-

Gradle Daemon started infinite loop

When i Sync Project with Gradle Files, Run app or Build in Android Studio,
In Build Output, it show
Starting Gradle Daemon...
Gradle Daemon started in - s --- ms
After it, no space remains in the memory and I have to kill Android Studio from Task Manager
I search a lot about this, nothing worked till now
The problem for me was that my computer had enabled hotspot mode, so I disconnected it and worked for me.
The solution was given from korokinopio in the following link https://askandroidquestions.com/2020/11/06/gradle-daemon-started-infinite-loop/
I recently through this problem and I search lots of about it but there is no perfect solution.
finally today I just solve this,
Just connect you AS(Android Studio) with internet connectivity and problem solved automatically.
Good day

emulator not showing up on android studio

I've searched all over the web for the past 3 days and can't seem to find a solution. I've done everything mentioned in this post:
Android emulator not showing in Visual Studio
It seems all the 'working' solutions to this problem has been stated in what this guy says he did in his original post, including restarting ADB server (kill and start), restarting my computer, reinstalling emulator and HAMX, installing and running as an admin, changing the timeout delay, reinstalling almost everything, making sure my emulator is installed, etc.
It keeps saying Gradle build finished in 475ms, etc and then waiting for target device to come online for like 5-10 minutes and nothing happens. No emulator shows up. I can't seem to find the solution to this and I am on the verge of giving up, I really need Android Studio to work so I can start on my app.
Can I please get some guidance with this?
If it's relevant, I'm using a Mac.
Have you tried this. Go to the emulator settings and set the Graphics Emulation mode to Software GLES. The default mode will be automatic. I am not sure how it works, but that worked for me on two Linux machines. Being software emulation, the performance of the emulator will not be as good as when using hardware graphics. It seems to be a bug with the SDK.
For me the only thing that worked in macos was to disable docker before starting Studio.
Wipe the data of your Android virtual Device and then start the emulator.
I was using Android studio 4.2 and faced this issue.
No Solutions worked for me so I just erased android studio files. Updated to Android Studio Arctic Fox.
Link to remove android studio files from mac : How to completely uninstall Android Studio on Mac?
For Windows : How to completely uninstall Android Studio from windows(v10)?

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!

Resources