hawk icon indicating copy to clipboard operation
hawk copied to clipboard

Hawk is not built. Please call build() and wait the initialisation finishes.

Open cjiahuan opened this issue 7 years ago • 5 comments

Please try to fill all questions below before submitting an issue.

  • [ ] On which android versions do you have this issue? : Android 4.0+ 5.0+ 6.0+ 7.0+
  • [ ] On which phones do you have this issue? : OPPO Vivo Nexus Samsung HUAWEI meizu ......
  • [ ] Which hawk version are you using? : 2.0.1
  • [ ] Does this issue happen always or is it flaky? : flaky
  • [ ] Can you write failing test? : I can't , This case is uncommon, but it is a bug.
  • [ ] If it is Hawk.put and Hawk.get issue, can you write down which data you were trying to save and get it back? I save a java object. I call init() in MainActivity's oncreate().
  • [ ] Is the data you are trying to save it huge or small? I guess the data is small. It's just a object.

cjiahuan avatar May 03 '17 03:05 cjiahuan

Can you show me exactly how you are initializing and using?

orhanobut avatar Apr 02 '18 08:04 orhanobut

I have the same problem

I made an SDK and put the initialization of the hawk in it. However, when the SDK called hawk internally, the above error was reported.

hongguangqq avatar Nov 28 '19 07:11 hongguangqq

you should call: Hawk.init(context).build();

saeidmhd avatar Feb 16 '20 09:02 saeidmhd

I have Solution

// first call build method Hawk.init(context).build();

// Then do the stuff U want It won't Create Any Crash String s=Hawk.get("first","first");

karthik2342323 avatar Jul 14 '20 15:07 karthik2342323

any update for this error in file...below coe in error in logcat " Hawk is not built. Please call build() and wait the initialisation finishes."

akshat9902 avatar Feb 10 '23 08:02 akshat9902