Java – IOException occurs when running Android projects in Eclipse

IOException occurs when running Android projects in Eclipse… here is a solution to the problem.

IOException occurs when running Android projects in Eclipse

Every time I try to run an Android project from Eclipse using the Android plugin (run -> run), the emulator starts fine, but the upload fails, and the console gives this error message:

[2010-06-17 08:17:55 - HelloAndroid] Failed to upload HelloAndroid.apk on device 'emulator-5554'
[2010-06-17 08:17:55 - HelloAndroid] java.io.IOException: Unable to upload file: Local file doesn't exist.
[2010-06-17 08:17:55 - HelloAndroid] Launch canceled!

It seems that the apk compilation failed, but apart from a separate warning that the project does not specify API-level requirements, there is no other error in the console at all:

[2010-06-17 08:17:55 - HelloAndroid] WARNING: Application does not specify an API level requirement!
[2010-06-17 08:17:55 - HelloAndroid] Device API version is 8 (Android 2.2)

Solution

Make sure your list file specifies sdk:

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>

Related Problems and Solutions