Can I run regular applications on an emulator or on a USB device? Try creating a new emulator device and see if it helps.
I tried it with IDEA 11.0.1, 4.0.3 Android platform on Windows and it works fine:
Waiting for device. Target device: emulator-5554 (ICS) Uploading file local path: D:\dev\android-sdk-windows\samples\android-15\ApiDemos\out\production\Tests\Tests.apk remote path: /data/local/tmp/com.example.android.apis.tests Installing com.example.android.apis.tests DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.android.apis.tests" pkg: /data/local/tmp/com.example.android.apis.tests Success Running tests Test running startedFinish
You can also try restarting adb using adb kill-server and starting the emulator manually from the AVD manager.
Make sure that the pre-installed ApiDemos application is not installed in the emulator, or the signatures do not match. Remove the existing ApiDemos, then try deploying and running ApiDemos from IntelliJ IDEA, and then try running the test configuration again.
UPDATE: We did some research and found the source of the problem. By default, IntelliJ IDEA sets the dependency area for the application module inside the Compile test module, so that all production and test classes are compiled into one Test.apk.
Instead, the scope should be set to Granted , and we will fix it in the next update. Right now you need to fix it manually, as shown in the screenshot:

Restore the project and run the tests, again, this time 2 separate apk files will be deployed, one for the main application and one for the tests, then the tests will be executed:
Waiting for device. Target device: emulator-5554 (ICS) Uploading file local path: D:\dev\android-sdk-windows\samples\android-15\ApiDemos\out\production\Tests\Tests.apk remote path: /data/local/tmp/com.example.android.apis.tests Installing com.example.android.apis.tests DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.android.apis.tests" pkg: /data/local/tmp/com.example.android.apis.tests Success Uploading file local path: D:\dev\android-sdk-windows\samples\android-15\ApiDemos\out\production\ApiDemos\ApiDemos.apk remote path: /data/local/tmp/com.example.android.apis Installing com.example.android.apis DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.android.apis" pkg: /data/local/tmp/com.example.android.apis Success Running tests Test running startedFinish
source share