karussell/snacktory

Snacktory on Android? java.beans.Introspector

rubdottocom opened this issue · 6 comments

Hi! I'm trying to make it work on Android project but when I initialize fetcher:

HtmlFetcher fetcher = new HtmlFetcher(); 

A java.lang.NoClassDefFoundError: Failed resolution of: Ljava/beans/Introspector; is thrown.
I read about java.beans are not fully implemented on Android, and I found Open Beans project http://code.google.com/p/openbeans/ but I don't know how to make it work or if there is a simpler way to fix that exception.

Thank you.

Sorry, I don't know. Try to rename the open bean source files back to java.beans and put the jar in your app and see what happens.

Hi! I added snacktory sourcecode to my project and added android version of slf4j http://www.slf4j.org/android/ and jsoup http://jsoup.org/download as external .jar libraries and seems to be enough to make it work :-)

I think is very useful information, maybe you can add it on you Readme.

BTW, your work is amazing!

Thank you very much.
Regards.

He declares them in the pom file, which should be enough because this project uses maven to build.

@DHuckaby I tried first what you say (converting the pom to gradle file) but some dependencies, I don't know which, had java.beans dependencies and the app fails. Maybe prepare an Android pom or gradle file for better handling of this it's a better idea, but I don't have many experience with maven :'(

Yes, I also think pom.xml is kind of standard even for gradle users ;)

Regarding the android pom.xml - feel free to share your code here or provide an assembly xml as pull request similar to:

https://github.com/graphhopper/graphhopper/blob/master/core/src/main/assembly/android.xml

Added in readme: b868660