I am writing android app – the client and java server. I am using restlet library. When I am running an app on my phone I get following errors in logcat:
11-19 13:43:53.665: E/dalvikvm(10130): Could not find class 'java.beans.XMLDecoder', referenced from method org.restlet.representation.ObjectRepresentation.<init>
I suppose I have to change object serialization method (I would prefer to use Java native serialization, as it’s like that on the server) but I have no idea how to do it.
The code in android app:
ClientResource cr = new ClientResource(
"http://192.168.1.102:8182/speedLimit"
);
resource = cr.wrap(SpeedLimitsResource.class);
coords.setLatitude(55);
coords.setLongtitude(16.5);
pack = resource.retrieve(coords);
pack and coords are instances of Transport classes shared between the client and server. They implement Serializable, they are in the same package.
How can I make it work?
Make sure you use android edition for restlet: http://www.restlet.org/downloads/stable