IOException when running Android projects in Eclipse
Every time I try to run an Android project from Eclipse with the Android plugin (Run -> Run), the emulator starts up just fine, but the upload fails, and the Console puts out 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 as though the apk compilation is failing, but there are no other errors in the Console at all except for a 开发者_StackOverflowlone warning about the project not specifying an API Level requirement:
[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)
Make sure your manifest file specifies the sdk:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
In fact, the APK file has not been generated. Try to see if there are compiling errors. If not, try to compile the project by yourself. You can read these interesting articles:
- How to build Android application package (.apk) from the command line using the SDK tools + continuously integrated using CruiseControl
- Developing Android without Eclipse or Ant
精彩评论