adb cannot start daemon, CreateProcess failure, error 2
I solved this problem long ago, but did not update this question.
I was having this issue because I was running the incorrect adb executable. I had one executable in C:\Windows\system32
and another in a different directory. The version in C:\Windows\system32
had did not have all the files needed by adb whereas the version in the other directory did. I'm not sure what those files were, but the adb executable was the same version in both directories. Since C:Windows\system32
was in the PATH first, that version was executed first. I removed adb from the Windows directory, and the problem went away.
Air-Adb: Error Cannot run program bash.exe: CreateProcess error=2, The system cannot find the file specified)
I think you need to run your apps over wifi, to do that you need plugin
so go to File --> Settings --> Plugins then search ADB WiFi connect download it and restart your Android studio, then you will get a new icon in your top bar click it and connect your phone to computer via USB cable, USB cable is only for the first time.
Note: your computer and your android phone they must have connected
the same network
Android ADB - Daemon still not running
Check that you have the correct USB drivers for your Android device installed (they should either include or be downloaded with an ADB driver).
If you haven't installed
platform-tools
, you need to do so. You can get a copy from the Android Developer's website: https://developer.android.com/studio/releases/platform-toolsIf this was already working for you and it has recently stopped, on Windows - try reinstalling the driver and/or checking that the device is actually recognised. You can do so by running
devmgmt.msc
with + R or from command prompt.
It might be worth just checking that your USB cable is not damaged - ideally try connecting your phone to another computer or with another USB cable. This has been an issue more times than I would care to admit.
Android Studio ADB connection error
You need to kill the adb process that is running, to do so,
Go to Spotlight search, open Activity Monitor,
Loop for adb under CPU tag,
Now Select it and Force Quit the process.
You can kill adb process through Terminal command too, by simply typing Kill -9 adb
Note: Sometimes When u tried to force close them they kept restarting. Make sure you quit any emulators and disconnect any devices to avoid any mistake.
Error initializing ADB: Unable to create Debug Bridge: Unable to start ADB server
There are a couple of solutions depending on what exactly is causing the problem.
So, just follow the following steps.
Step 1:- Close Android-Studio.
Step 2:- Open Command prompt or win + r, type cmd
and press Enter.
Step 3:- Navigate to your platform-tools
, in most of the cases the location is:
C:\Users\[user]\AppData\Local\Android\android-sdk\platform-tools
but in your case, the location is:
C:\Android\Sdk\
For Mac users the path is
/Users/[user]/Library/Android/sdk/platform-tools
Step 4:- Type adb.exe start-server
, Press Enter
Step 5:- Open Android Studio again.
For Mac the command is just adb start-server
The problem should be solved!
If the problem persists, then follow these steps-
Step 1:- Close Android Studio.
Step 2:- Press Alt + Ctrl + Del, then choose Start Task Manager
.
Windows Task Manager opens.
Step 3:- Go to the processes
tab.
Step 4:- Look for adb.exe
and select that.
Step 5:- Press End Process
.
Step 6:- Open Android Studio again.
That's it. Now your problem must be solved!
But if the problem is still there (which I don't think will happen), then there is something wrong (or might be missing) in your platform-tools
.
To fix that, delete platform-tools
from your computer, then download them again from Official Android Developer website.
Extract the downloaded file.
Now place the extracted file, where platform-tools
were located before deleting.
Default Location of platform-tools
is
C:\Users\[user]\AppData\Local\Android\android-sdk\
But in your case, the location is
C:\Android\Sdk\
Related Topics
Android Access to Remote SQL Database
Transfer Data from One Activity to Another Activity Using Intents
How to Raise a Toast in Asynctask, I am Prompted to Used the Looper
Elevation on Android Lollipop Not Working
Notifydatasetchanged Not Working on Recyclerview
How to Implement a Gcm Hello World for Android Using Android Studio
Getactionview() of My Menuitem Return Null
Multiple Table SQLite Db Adapter(S) in Android
How to Prevent a Scrollview from Scrolling to a Webview After Data Is Loaded
Android Navigation Drawer on Top Actionbar
How to Handle Oncontextitemselected in a Multi Fragment Activity
Am I Getting the Steps Right for Verifying a User's Android In-App Subscription
Why There's a Separate Mutablelivedata Subclass of Livedata