Android Studio无法选择设备调试进程,OK按钮禁用问题求助
Hey there, fellow Android newbie! I’ve been stuck with this exact issue early on, so let’s walk through the most likely fixes to get your debugger working.
ADB isn’t recognizing your device
Even if you’ve installed drivers, ADB might not be detecting your phone. Open a terminal/command prompt and run:adb devices
If no device shows up:- Restart the ADB server:
adb kill-serverfollowed byadb start-server - Unplug and reinsert your USB cable, or try a different USB port (avoid USB hubs if possible)
- Check your phone’s USB connection mode—switch to File Transfer (MTP) or Android Auto (some devices block ADB in charging-only mode)
- Restart the ADB server:
Your app isn’t set to debuggable
Double-check that your build variant is set to Debug (not Release) in Android Studio—release builds disable debugging by default. If you’re working on an older project, make sure yourAndroidManifest.xmlhas the debuggable flag enabled:<application android:debuggable="true" <!-- other attributes --> >(Note: For newer projects using Gradle, this flag is automatically set for debug builds, so you don’t need to add it manually.)
You skipped USB debugging authorization
When you first connect your phone to your computer, a pop-up should appear asking to allow USB debugging from your PC. If you missed this or accidentally denied it:- Go to your phone’s Developer Options > Revoke USB debugging authorizations
- Unplug and reinsert your cable, then tap "Allow" when the pop-up reappears
ADB version mismatch between computer and device
Outdated or mismatched ADB versions can break communication. Update your Android SDK Platform Tools to the latest version via Android Studio’s SDK Manager. After updating, restart the ADB server as mentioned earlier.The app process isn’t properly loaded
Instead of manually selecting the process, try stopping the app completely, then click the Debug button in Android Studio directly. This will reinstall the debug build and launch the app, which usually makes the process appear automatically with the OK button enabled.
内容的提问来源于stack exchange,提问作者Damara Jati P

