1

I have a Samsung Galaxy Nexus LTE for Verizon

I downloaded the latest Android SDK and eclipse (JUNO) and the Android Plug-In for Eclipse (JUNO). However when I click RUN, eclipse doesn't or can't find the device. When I try to run it with AVD. This may be unrelated but running it in AVD, I get errors

[2012-08-09 11:41:49 - My First App] res\layout\activity_main.xml:0: error: Resource entry activity_main is already defined.
[2012-08-09 11:41:49 - My First App] res\layout\activity_main.out.xml:0: Originally defined here.
[2012-08-09 11:41:49 - My First App] My First App\res\layout\activity_main.out.xml:1: error: Error parsing XML: no element found 
prolink007
  • 33,872
  • 24
  • 117
  • 185
Cocoa Dev
  • 9,361
  • 31
  • 109
  • 177
  • what is the output of `adb devices` when your device is connected ? What OS are you using? – user827992 Aug 09 '12 at 16:11
  • possible duplicate of [Android project won't build when editing a resource file](http://stackoverflow.com/questions/1674101/android-project-wont-build-when-editing-a-resource-file) – prolink007 Aug 09 '12 at 16:15

2 Answers2

1

When you plug your device into the computer with eclipse launched. Does the device show up in the device list provided by eclipse?

If not, you may need to enable "usb debugging" on your phone and install the drivers for the phone on your computer.


HOWEVER, it seems like the error you posted is going to prevent the app from running on the phone. This could also be the problem.

Kevin Tighe

I ran into this as well.

If you have an xml file open and click the 'Run' button, then instead of running your Android project Eclipse will try to run a transform on the xml file. It then creates a new xml file with the output of the transform and adds it to your project. Then the project will fail to run at all because of the existence of the duplicate xml file.

So make sure you don't have any duplicate xml files in your project (look at the manifest file, as well as layout files). The way I work around this is to make sure the project tree has focus (or just select a tab with a java file) before clicking 'Run'.

There is likely a better way to handle this (via a config change perhaps), but I'm pretty new to Eclipse and that's the workaround I came up with :). Hope that helps.

REFERENCE

Community
  • 1
  • 1
prolink007
  • 33,872
  • 24
  • 117
  • 185
  • What list in eclipse? When I type adb devices, I see the serial number. Where should I look in eclipse? – Cocoa Dev Aug 09 '12 at 16:20
  • Window -> show view -> android -> devices. Click on devices and click "ok". That should bring up a devices window. See if your device is there. If not, try disconnecting your device and re-connecting. If ADB is detecting your device, you should be good. Try the second solution in my answer. Follow the reference i linked for more solutions that could help you. This is a problem that others have had before. – prolink007 Aug 09 '12 at 16:22
1

Had the same problem for Galaxy Nexus myself. Solution: Install the driver off of Samsung's website.

ninge
  • 1,592
  • 1
  • 20
  • 40