4

I'm a noob to Java, Eclipse and Android application development. I'm going through the Android app tutorial but can't seem to get the first lesson to launch on my device. After fixing a handful of issue preventing the project from compiling I was able to get it to run on an AVD. But have had no luck on a physical device. The following are the details of my environment and what the console shows me.

On the phone I tried looking for the install under apps, downloads and the desktop but don't see it.

Computer: Windows XP

Device: Samsung Galaxy Nexus running 4.1, kernel 3.036-04142-gfa7dc12-dirty

Dev Env: Eclipse Juno

Console:

[2012-07-10 13:35:11 - MyFirstProject] ------------------------------
[2012-07-10 13:35:11 - MyFirstProject] Android Launch!
[2012-07-10 13:35:11 - MyFirstProject] adb is running normally.
[2012-07-10 13:35:11 - MyFirstProject] Performing com.example.myfirstapp.MainActivity activity launch
[2012-07-10 13:35:14 - MyFirstProject] Uploading MyFirstProject.apk onto device '014994321500300C'
[2012-07-10 13:35:14 - MyFirstProject] Installing MyFirstProject.apk...
[2012-07-10 13:35:14 - MyFirstProject] Success!
[2012-07-10 13:35:14 - MyFirstProject] Starting activity com.example.myfirstapp.MainActivity on device 014994321500300C

Thanks for the quick responses.

My phone is visible from Eclipse when debugging. I hadn't specifically installed the Samsung driver on the machine I'm doing this on. Checking Device Manager I saw the phone was not recognized properly by Windows. I have since installed the driver and can now perform actions on the phone through the command prompt (e.g. adb reboot).

After installing the driver I rebooted my pc and phone. Unfortunately the default intent still does not load on the phone as it does when using an AVD. I'd be happy using the AVD but it is pretty slow on my pc plus it's just cooler to hold it in your hands (it's more real). :)

ligi
  • 39,001
  • 44
  • 144
  • 244
Scott
  • 41
  • 1
  • 1
  • 3
  • 3
    Are there any errors in LogCat? – JRaymond Jul 10 '12 at 17:48
  • In eclipse if you go to `Window -> Show View -> Device Management` do you see your Galaxy nexus device listed? – FoamyGuy Jul 10 '12 at 17:49
  • Yes, I do see the handset listed with labels: online and debug wtih a number of running processes. – Scott Jul 16 '12 at 14:17
  • I second JRaymond's question: does LogCat (not the console) contain any useful information? If not, perhaps you should put some trace statements in your default Activity or your Application class in order to determine whether the app is even being started. – Dalbergia Jun 27 '13 at 13:31
  • Another thought: Are you sure all your resources (especially layouts) are valid for the device? If you have different layouts for (say) mdpi and hdpi devices, you might be seeing the mdpi version run fine in the emulator, but encountering an error in the hdpi version on the device. Maybe a long shot, but worth considering. – Dalbergia Jun 27 '13 at 13:33
  • After install (it looks like a success), can you find your app in the device's launcher? Can you launch into your Activity by clicking it from the Launcher on the device? – Matt Jun 27 '13 at 13:59
  • The issue is he doesn't have the launch configuration in his manifest. Try it yourself, if your manifest is blank Android will install the APK, list it as installed, but will not display a launcher as there is no way to launch it! – stevebot Oct 16 '14 at 20:36

4 Answers4

1

For google Nexus devices you should download Google USB Driver from here: http://developer.android.com/sdk/win-usb.html After installing this(from android sdk manager) just restart eclipse and it should recognize and install the apk on your physical device

simas
  • 222
  • 1
  • 8
0

Check in DDMS perspective of eclipse ADT if your device is listed or use adb devices command to check that from console. From the logs it seems to find the device and install properly so that is most likely not the issue.

In debug perspective go to preferences and select the break on exception options and start the app in debug mode. This link shows how to configure eclipse:

Break when exception is thrown

You will then be able to inspect the error your app fails on. Alternative option is to check logcat for errors.

Community
  • 1
  • 1
hcpl
  • 17,382
  • 7
  • 72
  • 73
0

i think your problem with configration with ADT plugins and also you have to install related SDK updated version. be specific to select Emulator version as per your application.

take new eclipse version and SDK from below link

http://developer.android.com/sdk/index.html

take Android 4.2 API

http://developer.android.com/about/versions/android-4.2.html

0

The other answers here are not true and flat out not helpful. I was in this exact situation, and its always caused because of a silly mistake. Check your manifest! If your manifest is blank, or there is no application, or launcher activity then Android will not have any clue about how to launch your activity and hence will not show a launcher icon!

Unfortunately, there is no stack trace AND your application will show up in the application manager as being installed.

I ran into this problem myself when switching up gradle configurations. I accidently didn't load in my Manifest which I use to merge over a blank manifest.

stevebot
  • 23,275
  • 29
  • 119
  • 181