NoClassDefFondError in Android… but the Class is in one jar included in the Classpath

后端 未结 6 945
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-31 03:19

I am developing an App in Android. It has to be able of take a photo, and to send that photo to a webpage. This is the code:

HttpClient httpclient = new Defa         


        
6条回答
  •  -上瘾入骨i
    2020-12-31 03:58

    I had a few issues with this today:

    a) I had all the jar files to the libs directory and went right click on Project > Build Path > Add external jars > selected the jar files. Then went "order and export", still got the issue. b) Turns out that httpclient-4.3.1.jar and httpmime-4.3.1.jar weren't enough. I needed to add httpcore-4.3.jar as well.

    That got rid of the error! :D I have spent nearly 4 hours today trying to fix this :(

提交回复
热议问题