How to solve intellij idea android adb connection not available exception

When we test android application in intellij idea , sometimes we got adb connection not available exception ,and this is an example to show how to solve it.

1. The exception

When we start the app, the emulator started, and then we got this:

adb connection is not available

2. The solution

You can just do as follows:

  • terminate intellij idea and the android emulator
  • check the process manager , make sure there is not any java application running
  • restart the intellij idea,and run the android application to start the emulator
  • when the emulator started, click the android monitor to view the logs messages of the emulator
  • If your app is still not running in the emulator, just rerun the app

You can find detail documents about the android adb here: