I have been using jsoup 1.6.3 successfully in an Android app to read data from a website.
I recently upgraded the Android SDK tools to version 21.0.1 and the Android SDK Platform-toolls to version 16.0.1 and now it no longer works. When I rebuild the application, install it on a device, and run it, I get "Sorry! The application XXXXX has stopped unexpectedly".
My code seems to import the library successfully with:
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
But then in my method, the first time I try to do anything with jsoup:
Document document = Jsoup.connect(SPOT_SERVER_BASE).get();
I get the above error message with I try to run the app on a device. And the logcat says:
could not find method org.jsoup,Jsoup.connect
I get the idea that my app isn't connecting with the jsoup library at all. I have also downloaded version 1.7.1 and I get the same results. Any ideas what I am doing wrong?
Thanks.
If SPOT_SERVER_BASE
is a string, your listed codeparts are ok. So i guess its an android problem. Please check this bugreport, maybe it can help you: http://code.google.com/p/android/issues/detail?id=27490
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.