pilgr/Paper

Paper.init() inside custom view

developerGM opened this issue · 1 comments

I am trying to add Paper inside a custom view

@Override protected void onFinishInflate() { super.onFinishInflate(); Paper.init(mContext); }

but I have a render exception

java.lang.RuntimeException: Couldn't create Paper dir: null\io.paperdb

pilgr commented

Hey, init Paper in custom view is a bad idea. Init should be called once, preferably when application or activity is created. Please refer to the doc https://github.com/pilgr/Paper#initialize-paper