I'm trying to use JSoup 1.6.0 with my Android application and it throws a NoSuchMethodExists exception.
This other question tells me that isEmpty() was not added to Java JRE until 1.6 -- I've checked my JRE in eclipse, and it is 1.6, however when I try to run my app on my emulator it throws the above exception. Is there a fix, or should I just import the Apache Commons Lang library?
String.isEmpty()
isn't available until API level 9. Instead, you can use TextUtils.isEmpty()
.
It looks like JSoup 1.6 introduced code that uses String.isEmpty()
and therefore will require Android API level 9. I would suggest using an older release of JSoup for now if you are targeting Android API level 8 or lower (Froyo).
This is being treated as a bug in JSoup 1.6.0 and you can expect a fix soon. See https://github.com/jhy/jsoup/issues/103 for status.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With