2

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?

Community
  • 1
  • 1
k-prog
  • 173
  • 2
  • 13
  • You could try to move up the jar file in "Order and Export". Right click on the project -> properties -> Java build path -> Order and Export. – jontejj May 21 '13 at 21:50
  • Can you explain the problem in this question. So that this question is independent of the other one. – FDinoff May 21 '13 at 21:56
  • We have no idea what you can do, because we don't really know what you did. We don't even know how you're building it. – Dave Newton May 22 '13 at 00:09
  • The Jar for jsoup does not appear in the 'Order and Export' tab? – k-prog May 22 '13 at 08:59
  • The problem is that when I run my android application and click the button that triggers the jsoup component it crashes. The error is as described in the title. I am using the latest version of everything like eclipse ADT, R17 and jsoup 1.7.2. Can't post my code right now as I'm posting from my phone but I know there is no problem with the jsoup component because it runs fine as a standalone application in Java SE. – k-prog May 22 '13 at 09:06
  • Found the answer here: http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt-22 – k-prog May 22 '13 at 09:35

3 Answers3

3

Found the answer here Basically just needed to tick the got to the 'Order and Export' tab and check 'Android Private Libraries'

Community
  • 1
  • 1
k-prog
  • 173
  • 2
  • 13
0

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

Imran Jawaid
  • 471
  • 1
  • 10
  • 27
0

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.

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102