views:

40

answers:

2

Hi.

I have created a small and simple android app. I tried installing it on an actual android device. But because it won't install, I created an AVD resembling my phone. I tried copying and installing app on that AVD and it still says that error. "Application xxx could not be installed on this phone".

Before I tried installing my app on the phone or AVD I following steps: 1. Exported an unsigned copy of application onto my hard-drive. 2. User jarsigner to sign the app 3. Verified with jarsigner that my app is signed properly. 4. Used zipalign to optimize the app resources.

I do not have an icon assigned to myapp but mandatory properties like version etc. have been specified properly.

I had initially developed app using 2.1 version but because of compatability issues with my phone I reverted code to compile on 1.5 and it still doesn't get installed either on AVD or my phone.

My AVD is on 2.1 though and code is compiled with 1.5.

Is there a place where I can see the logs as to why app is not getting installed. It would be really helpful.

Cheers

+1  A: 

Try using adb install to see if you get an error.

adb logcat will give you the logs from your device (phone or emulator) so you might find a stacktrace there.

Fredrik Leijon
is there a way to see the logs on the actual device too, to see what is the possible error.
Priyank
Just attach the device with usb and run adb logcat, you might need to have usb debugging enabled.
Fredrik Leijon
+1  A: 

This can happen if you have a Debug version installed on the device already (from a USB debug session). Either do adb -d uninstall com.example.yourapp or uninstall in the Preferences->Applications screen on the phone itself.

Jim Blackler
Thanks a ton. That actually did install my app on the avd. But now I am left wondering what's going wrong on actual device. Any ides, as to how I could view logs there. It's never been previously installed there.
Priyank
You should be able to view the logs on your device with `adb -d logcat`, or it should appear on the Devices list in Eclipse, and selecting it should show the output in the Logcat view (you may need to be in the DDMS Perspective).Another thing to check is the SDK level in the Manifest.. make sure if you want 1.5 support that it says `<uses-sdk android:minSdkVersion="3" />`
Jim Blackler