问题
I'm having the exact problem as described here. I followed the solutions here. I have added the jsoup jar to the \libs folder but it just still won't work. Tried loads of different stuff like deleting the jar and re-downloading but nothing has worked? At a loss at what else I can do?
回答1:
Found the answer here Basically just needed to tick the got to the 'Order and Export' tab and check 'Android Private Libraries'
回答2:
You are doing it wrong. You cant use Jsoup functions in the on-create of Activity. You need to make either Async Task or thread.
This is to prevent doing blocking tasks in you activity.
Here is a nice blog that explain how to do it and provide sample code as well.
Sample Code Click here
回答3:
Put Jsoup.jar
both in the AP and ACP. In both projects it should reside in libs
, imported as jar by eclipse. Clean the project and it will work.
I had a similar problem, with this context:
- Android Project (doesn't need itself jsoup)
- Android Class Project (needing jsoup)
- Jsoup.jar
I've imported the ACP in AP, with all classes, but it seems to won't recognize jsoup
, that was needed to prevent errors during compilation.
来源:https://stackoverflow.com/questions/16679911/android-java-lang-noclassdeffounderror-org-jsoup-jsoup-adding-jar-to-libs-do