I am using json-simple as an external Jar into my Eclipse project.
The Classpath for this external Jar is properly set into the .classpath file:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
[...]
<classpathentry kind="lib" path="json-simple-1.1.1.jar"/>
[...]
</classpath>
The Java code compiles without any error.
When I run the compiled code I get the following runtime error:
Could not find class 'org.json.simple.parser.JSONParser', referenced from method [...]
I can’t understand why, I think I am missing something but I can’t figure it out.
Thank you for the help.
You must make this library available in runtime, while your application is running within the emulator. To do this, put the
json-simple-1.1.1.jarfile in theassets/orlibs/directory, as per the documentation. It will be bundled with your application in the.apkfile and it should be available in runtime.