Search code examples
androidandroid-virtual-devicemobile-devicesinput-devices

Android debugging on Intellij/Android Studio - Forcing me to run on a virtual device


On many conventional Android projects, I can run my physical device plugged in the USB just fine once a build is complete and ran.

However, on certain projects, like a project I have exported from Unity, forces me to run on a android virtual device, not even an external virtual device like provided by Genymotion.

What is going on, and how do I fix it to debug on my physical device and/or other external virtual devices?


Solution

  • It's hard to tell where the problem really occurred, thanks to gradle... Try using the gradle tasks panel and trying the default build tasks, but what will really fix it is to get rid of all the gradle files in your project and reopen Studio. (To be safe I would move them, not delete them.)

    See this page: Gradle Builds - Android Dev Site