1

I have the android development tools running on my mac, and I need to build a project using JSON-RPC.

I'm using this library: http://software.dzhuvinov.com/json-rpc-2.0-client.html

I take the following steps: - Download both the client and base jar file. - Drag them into the libs folder. - Paste the sample code from the site in to the main activity's onCreate function.

After that I run the test app in the simulator, which produces the following error message:

12-08 17:41:40.271: E/AndroidRuntime(2119): java.lang.NoClassDefFoundError: com.thetransactioncompany.jsonrpc2.JSONRPC2Request

What am I doing wrong?

Nico Griffioen
  • 5,143
  • 2
  • 27
  • 36

1 Answers1

0

right click project > Properties > java Build Path > Add External JARs then navigate to where you have your jar and add it.

Jimi
  • 539
  • 5
  • 21
  • I've already tried all these suggestions, but it doesn't work, could there be a problem with java or a plugin I need to install that I'm missing? – Nico Griffioen Dec 10 '13 at 15:38
  • I found this blog post but since i don't know which of the many scenarios stated may be cause of your problem, you will have to go through it to understand which solution works for you. http://javarevisited.blogspot.com/2011/06/noclassdeffounderror-exception-in.html – Jimi Dec 10 '13 at 15:53
  • I would also advice you go through the code you pasted in you `onCreate()` method to be sure it's not the problem. – Jimi Dec 10 '13 at 15:56