Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在此链接中使用 siegmann 方法读取 epub 文件:http ://www.siegmann.nl/epublib/android但我有一个问题,当我调试时,它有一个错误:
`Book book = (new EpubReader()).readEpub(epubInputStream);`
当我使用命令进行测试时: EpubReader epub = new EpubReader(); 该行仍然有错误。请帮我!!!
EpubReader epub = new EpubReader();
您没有将 slf4 lib 文件加载到项目中。将 slf4-api 和 slf4-simple 添加到 libs 文件夹中的 slf4-android 并将其添加到构建路径
您可以将您的 epub 文件放入文件夹“assets”并尝试以下操作:
InputStream is = getAssets().open("bookName.epub"); Book book = new EpubReader().readEpub(is);