Comments (5)
How do you init Hawk? Could be something else
from hawk.
public void onCreate() {
super.onCreate();
Hawk.init(this)
.setEncryptionMethod(HawkBuilder.EncryptionMethod.MEDIUM)
.setStorage(HawkBuilder.newSharedPrefStorage(this))
.setLogLevel(BuildConfig.DEBUG ? LogLevel.FULL : LogLevel.NONE)
.setCallback(new HawkBuilder.Callback() {
@Override
public void onSuccess() {
Log.d(TAG, "Hawk initiated on App");
}
@Override
public void onFail(Exception e) {
Log.d(TAG, "Hawk not initiated on App");
}
})
.build();
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("Roboto/Roboto-Regular.ttf")
.setFontAttrId(R.attr.fontPath)
.build());
Iconify
.with(new IcomoonModule())
.with(new FontAwesomeModule());
if (!BuildConfig.DEBUG) {
CrashlyticsFacade.initCrashlytics(this);
}
startCatcher();
}
from hawk.
The issue seems that Hawk is called before initializing is actually finished due to callback. To make sure it can you remove callback line and try it? If the callback is required due to performance reason, we could find a better solution.
from hawk.
You were right - after removing callback I didn't get any NPE so far...
from hawk.
glad to hear that, closing this issue.
from hawk.
Related Issues (20)
- why not use apply but commit?
- Is there a way to setup namespace of the keys? HOT 1
- java.lang.SecurityException: MODE_WORLD_READABLE no longer supported
- Deserializing long as double
- error after changing setEncryption
- multiprocess
- can't find version 2.1.0 HOT 1
- Hawk isn't a 64-bit compliant library HOT 3
- Hawk V2.0.1, illegal type variable reference HOT 4
- The code base at tag (v.2.0.1) doesn't match with the corresponding gradle dependency
- What is the maximum value of stored data HOT 1
- Can you reload Hawk after init?
- Is this project dead? HOT 1
- Hawk getting error while debuggind HOT 1
- Hawk.put and Hawk.get issue
- DefaultHawkFacade.java line 98
- Classifier 'Hawk' does not have a companion object, and thus must be initialized here
- can't get data when overriding apps HOT 2
- ANR problem when init Hawk HOT 1
- Hawk.count() shows it has items but when use hawl.get(key, type) it gives only last or zero items
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hawk.