Tencent / MMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
Other
17.43k stars 1.91k forks source link

Android 在application中的初始化可以放在线程中么? #678

Closed nianzixin closed 3 years ago

nianzixin commented 3 years ago

The language of MMKV

e.g. Objective-C, Swift, Java, or Kotlin

The version of MMKV

e.g. v1.2.2
Note: For versions older than the latest version, please upgrade before posting any issue.
We don't have much time for old version tech support.

The platform of MMKV

e.g. iOS or Android

The installation of MMKV

e.g. Cocoapods, Carthage, Maven, AAR Package or Git clone

What's the issue?

Post the outputs or screenshots for errors.

Explain what you want by example or code in English. If you have a crash/OOM/ANR on Android, please provide symbolize stack traces. https://developer.android.com/ndk/guides/ndk-stack.html

What's the log of MMKV when that happened?

Your detail logs. As much as possible. For how to forward MMKV's log, you can checkout the wiki on each platform.

lingol commented 3 years ago

You can. Just make sure you don't get any MMKV instance before the initialization finish.

lingol commented 3 years ago

However, I don't get the point of doing this. MMKV's initialization doesn't cost much time.