androidamazon-web-servicestvm

AWS Identity Token Vending Machine - Android Code Error


I am using;

For using AWS Token Vending machine code I used sample code for android from below link; http://aws.amazon.com/code/4598681430241367

As per instructions I added following libs to project classpath;

and when I run in emulator and device; I receive following error at runtime (no error at compile time)

 java.lang.NoClassDefFoundError: com.amazonaws.util.DateUtils
    at com.amazonaws.tvmclient.Utilities.getTimestamp(Utilities.java:28)
    at com.amazonaws.tvmclient.LoginRequest.buildRequestUrl(LoginRequest.java:50)
....

However, in code when I checked - the class is imported and there are no compile time errors

import com.amazonaws.util.DateUtils;

and here how it is used in code (Utilities class sample code);

new DateUtils().formatIso8601Date( new Date() );

would appreciate any pointers


Solution

  • You may need to update the Eclipse project settings to ensure all classes are exported for Dexing. Please take a look at the instructions at the following blog post and see if this solves your issue:

    Running AWS SDK for Android samples in Eclipse with ADT v22