2

So, I'm just trying to get into Android development and trying to setup my system with eclipse so I can run through the tutorials and whatnot to familiarize myself with the ecosystem. I'm running this on Ubuntu 12.10 (amd64) with eclipse version 3.8. I've run into a couple issues/questions with the initial setup and I'm not sure what to do about them...

1 - I don't seem to get the "adb devices" command to see any devices. I have both a Verizon Galaxy Nexus and a Nexus 7 tablet connected to my system and nothing is seen. I tried adding a couple Vendor IDs to the adb_usb.ini file, but that doesn't seem to have done the trick. The two IDs I added are "0x4e41" and "0x18d1" - I thought the latter was the "Google" device ID, but I'm obviously mistaken somewhere.

2 - I don't have anything configured under the "Run" button and I'm not sure how to configure running apps through the AVD emulators or through a device. I'm pretty sure I'm not going to be able to run any apps through my devices since adb isn't seeing them, but I do have a 4.1 AVD setup, which should be able to run any apps created. How do I configure the Run button to push the app through the emulator? Does it need to be started first or can it start the emulator and push the app automatically? Also, once I resolve the issue above in part 1, how do I configure the Run button to send apps to either of my devices?

Any/all help would be much appreciated. Thanks in advance.

EDIT: As both comments up till this point have mentioned using the Run menu, but I don't seem to have the same Run menu as either of you. The only thing I have under the Run menu is

  • "External Tools", then under that is
    • "Run As" (which is a sub-menu with nothing under it - I assume since I've not configured anything),
    • "External Tools Configuration..."
    • "Organize Favorites...".

I'm not seeing anything relating to "Run Configurations" at all.

EDIT2: I just tried adding the udev rules file as mentioned in the "Using hardware" page on d.android.com and that doesn't seem to have had any affect (even after reboot). Still not able to see any devices in "adb devices". And, yes, my devices both have USB debugging turned on.

EDIT3: Seem to have gotten the devices to show up in the adb devices listing, but still not sure how to load the apps onto them automatically. Also, I tried running the "ant debug" command listed on http://developer.android.com/training/basics/firstapp/running-app.html and I'm getting an error of:

Buildfile: build.xml does not exist!
Build failed

Not sure what should be in the build.xml file as this is just supposed to be the tutorial app.

3 Answers3

1

Usb does not need to be set up on ubuntu you may need to switch adt from stable to beta see notes - that may work reinstalling does not work. I did the upgrade and adt broke completely - fails on WST or something like that.

Richard
  • 11
  • 1
  • 1
    if you plan on debugging on device via usb the edit /etc/udev/rules.d/51-android.rules i.e. old method still works – Richard Oct 20 '12 at 18:04
0
  1. Have a look at the tutorial at http://developer.android.com/tools/device.html First make sure that you have the USB drivers. Make sure your Nexus device is set up for development. Load your drivers. It may be necessary to restart Eclipse to ensure that your new config takes effect.

  2. You can start your AVDs through the AVDManager, or from Eclipse. Go to Run-> Run Configurations to set up which device to send apps to, or which emulator to start up.

newfurniturey
  • 37,556
  • 9
  • 94
  • 102
CocoNess
  • 4,213
  • 4
  • 26
  • 43
  • Have you installed the ADTplug-in? It sounds like your dev environment isnt properly set up. The run config should just work, pretty much out of the box. – CocoNess Sep 23 '12 at 06:27
  • Also, did you create your project as an Android Application Project? – CocoNess Sep 23 '12 at 10:54
0

1) Have you set your Application to debuggable? Also, don't forget to set your device up to USB Debugging mode.

Then try this at the terminal:

cd android-sdk-linux/platform-tools/
su
killall adb
./adb usb

2) Go to Run > Run Configurations > Target tab > Select your 4.1 AVD (on Automatically pick compatible device) and hit run. After that you will just have to click on run do test your app.

newfurniturey
  • 37,556
  • 9
  • 94
  • 102
Victor Santiago
  • 902
  • 1
  • 10
  • 20