tags:

views:

79

answers:

2
+1  Q: 

android question

I am trying to run Apidemos sample on my PC. for that fst i hav launched AVD nd then run tht Apidemos app.. but it is giving me following errors...

[2010-10-16 10:33:43 - ApiDemos] Performing com.example.android.apis.ApiDemos activity launch
[2010-10-16 10:33:44 - ApiDemos] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'apidemoavd'
[2010-10-16 10:33:44 - ApiDemos] **WARNING: Application does not specify an API level requirement!**
[2010-10-16 10:33:44 - ApiDemos] **Device API version is 7 (Android 2.1-update1)**
[2010-10-16 10:33:44 - ApiDemos] Uploading ApiDemos.apk onto device 'emulator-5554'
[2010-10-16 10:33:52 - ApiDemos] **Failed to upload ApiDemos.apk on device 'emulator-5554'**
[2010-10-16 10:33:52 - ApiDemos] **java.io.IOException: Unable to open sync connection!
[2010-10-16 10:33:52 - ApiDemos] Launch canceled!**
A: 

To fix the API level warning, check uses-sdk element.

The failure seems to be caused by a disconnected device. Remember that you should allow USB debugging.

mrrtnn
Maybe the easier way would be to first check that adb is working through the command line (with 'adb devices' for example)
Matthieu
According to his console log, he's using an emulator. So 'Allow USB debugging' is either checked by default or does not need to be checked.
Stephan Branczyk
A: 

Try the steps recommended in the documentation: Eclipse isn't talking to the emulator

Let us know if that works. There are several more things that can be done if that doesn't work.

Stephan Branczyk