Troubleshooting: Cannot Run on an Android Device or Emulator
If you get either of the following error dialog boxes, use the suggested steps below:
Unable to create process: Could not find program, '<path>'
where <path> looks like the path to your Adb executable:
- Open the SDK Manager and verify that the value of the Adb location field is correct in the SDK Properties of your Android SDK.
- If the value is marked with a warning icon, you must update the path so that it points to your Adb executable (Android Debug Bridge).
Unable to start gdbserver on port <n>: Port is already in use
where <n> is the port number being used by the Android gdbserver:
- Power off or restart your Android device and then run your application again.
- Choose another debug port:
- Select Run > Parameters and enter the following in the Parameters field:
-debugport=<n>
where <n> is an alternate debug port, such as 54321.
- Then click OK.
- Select Run > Parameters and enter the following in the Parameters field: