0

I was trying to read a csv file in kotlin using intellij as IDE. I have added dependencies(commons-csv-1.6-bin.zip,link-https://commons.apache.org/proper/commons-csv/download_csv.cgi) and imported the CSVParser. on reading the file am geting an error like this

NoClassDefFoundError: org/apache/commons/csv/CSVParser

Jk_
  • 105
  • 6
  • How did you add the dependency, and how are you running your application? – yole Jan 25 '19 at 14:04
  • This does not look like a Kotlin problem, but an issue with Gradle, that you seem to be using. You should provide your `build.gradle`. – Danilo Pianini Jan 25 '19 at 14:54

1 Answers1

2

You should add the unpacked jar file from commons-csv-1.6-bin.zip\commons-csv-1.6\commons-csv-1.6.jar into the Module Dependencies.

If using Gradle, add the library via build.gradle configuration.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904