psiegman / epublib

a java library for reading and writing epub files
http://www.siegmann.nl/epublib
1.06k stars 317 forks source link

Exception when running a basic programme to read an epub. #119

Open Reizenchuu opened 5 years ago

Reizenchuu commented 5 years ago
       EpubReader epubReader = new EpubReader();
       try {
           Book book = epubReader.readEpub(new FileInputStream("res/overlord.epub"));
       } catch (IOException e) {
           e.printStackTrace();
       }
   }
 }`

I tried running this programme to read an epub, which I put inside a new 'res' folder and got the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: android/util/Log at org.slf4j.impl.AndroidLoggerFactory.getLogger(AndroidLoggerFactory.java:69) at org.slf4j.impl.AndroidLoggerFactory.getLogger(AndroidLoggerFactory.java:44) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254) at nl.siegmann.epublib.epub.EpubReader.(EpubReader.java:33) at pac.nyanpas.main(nyanpas.java:14) Caused by: java.lang.ClassNotFoundException: android.util.Log at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) ... 6 more

I'm using intelliJ IDEA for this.