Question

I am trying to get the CPU Utilazation from the cloudwatch, but i am getting error and unable to figure out what went wrong.

This is what I get in Logcat:

E/dalvikvm(22587): Could not find class 'com.amazonaws.auth.DefaultAWSCredentialsProviderChain', referenced from method com.amazonaws.services.cloudwatch.AmazonCloudWatchClient.<init>
E/AndroidRuntime(22587): java.lang.NoSuchFieldError: com.amazonaws.services.cloudwatch.AmazonCloudWatchClient.timeOffset
E/AndroidRuntime(22587):    at com.amazonaws.services.cloudwatch.AmazonCloudWatchClient.invoke(Unknown Source)
E/AndroidRuntime(22587):    at com.amazonaws.services.cloudwatch.AmazonCloudWatchClient.getMetricStatistics(Unknown Source)
E/AndroidRuntime(22587):    at com.abcd.abc.AWSCloudwatchActivity.findCloudWatchData(AWSCloudwatchActivity.java:106)

Thanks in advance.

Was it helpful?

Solution

I am one of the maintainers of the AWS SDK for Android. It sounds like you may be running into an issue we discovered with the latest version of the Android Development Tools and our SDK. You'll want to make sure you've exported the AWS SDK for inclusion in your app.

In Eclipse, right click on your project and select Build Path->Configure Build Path then under Order and Export make sure either the Android Private Libraries or the AWS SDK for Android is checked.

Hope this helps.

Edit

We've documented this issue on our blog.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top