javaandroidjaropencsv

NoClassDefFoundError after adding Opencsv jar to project


I've added the open csv jar to my project to enable data to be written out to file in csv format.

The jar file was added using the following steps:

1.Properties --> Add external jars --> opencsv-3.1.jar
2.Order & Eport tab --> tick, opencsv-3.1.jar

But when I run the project I get an error stating that one of the methods belonging to the opencsv jar cannot be found: java.lang.NoClassDefFoundError: com.opencsv.CSVWriter

Does anyone know how to resolve this error or am I missing some step in adding the jar to the project?

`


Solution

  • See javadoc of API

    CSVWriter is in au.com.bytecode.opencsv package