Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can debug android application within Intellij

I am using Intellij 11 on Mac for my android development.

I can get my android application to compile. But when I click 'Debug {my project name}', Intellij launch an emulator. But I want to run my app on phone.

Here is the output from the log:

Waiting for device.
/Users/michael/Programs/android-sdk-macosx/tools/emulator -avd test -netspeed full -netdelay none

And I have do this on command prompt, it sees my device:

~/Programs/android-sdk-macosx $ ./platform-tools/adb devices
List of devices attached 
55b95c2b        device
like image 568
michael Avatar asked Jul 22 '26 14:07

michael


2 Answers

Up on your top toolbar, you've got that dropdown list of stuff right next to the "run program" icon. Open up that list and choose "Edit configurations...". Under there you should see your app listed. Under the "General" tab, there's an area labelled "Target device" with some radio buttons. Select "USB device" and you should be good to go.

like image 67
Argyle Avatar answered Jul 25 '26 05:07

Argyle


Look under Run/Debug Configuration. To use a physical device, select the USB device option from the Target frop-down list in the Deployment Target Options area, and plug-in the device through a USB cable.

For more information, see

https://www.jetbrains.com/help/idea/2016.2/running-and-debugging-android-applications.html

like image 30
Kartik Goyal Avatar answered Jul 25 '26 03:07

Kartik Goyal