Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception java.lang.ExceptionInInitializerError #7

Open
chende008 opened this issue Jan 17, 2023 · 0 comments
Open

Exception java.lang.ExceptionInInitializerError #7

chende008 opened this issue Jan 17, 2023 · 0 comments

Comments

@chende008
Copy link

Exception java.lang.ExceptionInInitializerError:
at com.dylanc.mmkv.MMKVKt.mmkvString
at com.nova.dax.common.storage.AppStorage. (AppStorage.kt:21)
at com.nova.dax.common.ext.ActivityExtKt.resetThemeBar (ActivityExt.kt:47)
at com.nova.dax.common.ext.ActivityExtKt.resetThemeBar$default (ActivityExt.kt:44)
at com.nova.dax.base.BaseActivity.onCreate (BaseActivity.kt:26)
at com.nova.dax.ui.main.MainActivity.onCreate (MainActivity.kt:47)
at android.app.Activity.performCreate (Activity.java:8207)
at android.app.Activity.performCreate (Activity.java:8191)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3819)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4022)
at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2336)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8653)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Caused by java.lang.IllegalStateException: You should Call MMKV.initialize() first.
at com.tencent.mmkv.MMKV.defaultMMKV (MMKV.java:468)
at com.dylanc.mmkv.MMKVKt. (MMKV.kt:43)

AppStorage的第21行代码是:

var baseUrl by mmkvString(Const.BASE_URL) // 连接服务端的环境

目前上面的异常在samsung a01q;samsung a30;asus ASUS_A001D_1这三套机型上报了50多次,不明白是啥原因,其它手机都正常,自己也没有重现,不知大佬知道可能的原因不?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant