Running AWS SDK for Android samples in Eclipse with ADT v22
Android Developer Tools (ADT)
The ADT Plug-in for Eclipse is used to help developers build their Android apps. The samples included with the AWS SDK for Android are meant to be run with minimal configuration. ADT v22, released at GoogleIO, requires an additional step for successful execution of our code samples.
Error in LogCat
If you run our samples normally, you may see a
java.lang.NoClassDefFoundError in LogCat, as seen here:
Resolving this issue requires a change in the classpath to explicity export the AWS SDK for Android .jar file.
Fixing the samples
The following steps detail how to get the samples running properly:
- Right-click on the Project and select Build Path and then Configure Build Path as the following figure shows:
- Under Order and Export, make sure that aws-android-sdk-xxx.jar and Android Private Libraries are checked as shown here, and then click OK:
- Once you clean your project and restart the emulator, the application should run properly.
Fix coming soon
We are working on a fix for a future release of the AWS SDK for Android. In the meantime, we hope this post unblocks any development efforts.
If you like building mobile apps that use cloud services our customers use on a daily basis, perhaps you would like to join the AWS Mobile SDK and Tools team. We are hiring Software Developers, Web Developers, and Product Managers.