com.android.builder.testing.api.DeviceException: No connected devices

If you have android studio installed(if not install it) launch android studio with a dummy project, go to Tools -> AVD Manager. Make sure that you create a virtual device and start it.

enter image description here

enter image description here

Note: To create this virtual device you will need to download and install a compatible OS (compatible with your project’s Android SDK version – SDK version can be found inside build.gradle file) on it before launching. AVD Manager will guide you with the process.

Another thing, you may be using a real Android device not an emulator and still get this message. If your device is connected through USB to your laptop you need to first enable the developer options:

If using stock Android, go to Settings > About phone > Build number.
On a Samsung Galaxy device, go to Settings > About device > Build
number. On an HTC device, go to Settings > About > Software
information > More > Build number. On an LG device, go to Settings >
About phone > Software info > Build number. Tap Build number seven
times. After the first few taps, you should see the steps counting
down until you unlock the developer options. Once activated, you will
see a message that reads, “You are now a developer!” Go back to
Settings, where you’ll find a Developer options entry in the menu.
(https://www.digitaltrends.com/mobile/how-to-get-developer-options-on-android/)

Then inside developer options, you should enable USB debugging.

enter image description here

Leave a Comment