An crash issue will be ignored & closed in a week without logs.
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.
Your detail logs. As much as possible.
For how to forward MMKV's log, you can checkout the wiki on each platform.
An crash issue will be ignored & closed in a week without logs.
Note:
An crash issue will be ignored & closed in a week without logs.
The language of MMKV
The version of MMKV
The platform of MMKV
The installation of MMKV
What's the issue?
What's the log of MMKV when that happened?
The platform of MMKV
鸿蒙
"dependencies": { "@tencent/mmkv": "1.3.9", }
The version of MMKV
"1.3.9"
code: try { const rootDir = context.filesDir + '/ZebraMMKV'; MMKV.initializeWithPath(rootDir, context.cacheDir); } catch (e) {
打印出的error信息是 error: TypeError: is not callable
文档中: Customize location By default, MMKV stores file inside $(FilesDir)/mmkv/. You can customize MMKV's root directory on App startup:
let appCtx = this.context.getApplicationContext(); let rootDir = appCtx.filesDir + '/mmkv_2'; let cacheDir = appCtx.cacheDir; MMKV.initialize(rootDir, cacheDir);
MMKV.initialize(rootDir, cacheDir); 这方法在1.3.9 貌似已经没有了