i\'m using android studio 2.1.1 in ubuntu 14.04.Now my question is,i want to run the program through my phone without emulator. so i chose the target as usb dev
If you are using 32-bit ubuntu (my case) then it is most likely that Android Studio has downloaded 64-bit version of adb
and fastboot
inside your sdk/platform-tools
folder. I think you already have installed adb (and fastboot). If you haven't then run these commands in terminal:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
This will install 32-bit version of adb
and fastboot
. Now just replace the 64-bit adb
and fastboot
executable files in sdk/platform-tools
with the installed 32-bit versions:
cp /usr/bin/adb /sdk/platform-tools/adb
cp /usr/bin/fastboot /sdk/platformtools/fastboot
Now your android studio should be able to run your App in your device.