pilgr / Paper

Paper is a fast NoSQL-like storage for Java/Kotlin objects on Android with automatic schema migration support.
Apache License 2.0
2.34k stars 234 forks source link

io.paperdb.PaperDbException: Paper.init is not called #152

Closed CaoDangTru closed 4 years ago

CaoDangTru commented 5 years ago

Hi, The issue is still occuring in version 2.6. My device is Sharp AQUOS sense2 SHV43 (MZW), Android 8.1 This is crash log:

Caused by: io.paperdb.PaperDbException:

  1. at io.paperdb.Paper.getBook (Paper.java:95)
  2. at io.paperdb.Paper.book (Paper.java:68)

I know this cause, but i tried my app on google pixel, and it works fine. I don't know why? Could you give me some information? Thank you,

pilgr commented 4 years ago

You may have some race conditions were Paper.init calls depends. I'd suggest to make the call when Application class is created.