java - NoClassDefFoundError when running app in emulator/phone [Update to previous question] -


this update this question asked earlier today.

brief reiteration of problem: have android app requires use of amazon's android sdk aws. add necessary libraries (jar files) eclipse build path. however, when run app, app crashes noclassdeffounderror.

after bit of investigation, have isolated code causes error. have made simple dummy android app uses apparently buggy code. source code single activity here. , here logcat output.

i noticed couple of odd things this. if library wasn't being added correctly, should fail @ line 34:

credentials = new basicawscredentials( accesskeyid, secretkey ); 

but doesn't. instead, fails @ line 62, chains line 48.

line 62:

sdb = new amazonsimpledbclient( credentials ); 

line 48 (with part of 47):

list.setadapter(new arrayadapter<string>(this, r.layout.list_item, getinstance().listdomains().getdomainnames())); 

the funny thing is, sample project provided sdk works perfectly. here code simpledb, 1 of source files. have copied , pasted of code calling access amazon's simpledb, yet mine fails , sample doesn't.

so, have ideas?


turns out, jar files in aws sdk weren't built. appears missed old apache library no longer publicly distributed. amazon has updated download, , libraries no longer throw noclassdeffounderror.

source: forum post on aws mobile dev forum

in cases noclassdeffounderror means duplicate versions of class on classpath. think you should check dependencies/libraries duplicate .class files. please check file first in jar-s: org.apache.commons.httpclient.params.httpclientparams

hope helps!


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -