android 缓存使用
implementation 'com.tencent:mmkv:1.3.14'
初始化 app.kt 里面
MMKV.initialize(this)使用
MMKV kv = MMKV.defaultMMKV();
kv.encode("bool", true);
boolean bValue = kv.decodeBool("bool");
kv.encode("int", Integer.MIN_VALUE);
int iValue = kv.decodeInt("int");
kv.encode("string", "Hello from mmkv");
String str = kv.decodeString("string");如果以上内容对您有帮助,请老板用微信扫一下赞赏码。


