amitshekhariitbhu / Android-Debug-Database

A library for debugging android databases and shared preferences - Make Debugging Great Again
https://outcomeschool.com
Apache License 2.0
8.42k stars 868 forks source link

java.lang.IllegalStateException: You must call BDCommon.init first #225

Closed heyong2013 closed 1 year ago

heyong2013 commented 1 year ago

I found a problem. when I start the app, the app will be killed.error info:

java.lang.RuntimeException: Unable to get provider com.amitshekhar.debug.DebugDBInitProvider: java.lang.IllegalStateException: You must call BDCommon.init first at android.app.ActivityThread.installProvider(ActivityThread.java:8186) at android.app.ActivityThread.installContentProviders(ActivityThread.java:7722) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7586) at android.app.ActivityThread.access$2600(ActivityThread.java:259) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2440) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:219) at android.app.ActivityThread.main(ActivityThread.java:8673) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109) Caused by: java.lang.IllegalStateException: You must call BDCommon.init first at com.baidu.input.common.BDCommon.getApp(BDCommon.java:38) at com.baidu.input.common.utils.DensityUtils.px2dp(DensityUtils.java:37) at com.baidu.input.gamekeyboard.model.FloatKeyBoardModel.restoreBorderValue(FloatKeyBoardModel.java:352) at com.baidu.input.gamekeyboard.model.FloatKeyBoardModel.restoreAllBorderData(FloatKeyBoardModel.java:549) at com.baidu.input.ime.floatmode.FloatModeManager.restoreAllBorderData(FloatModeManager.java:366) at com.baidu.input.pub.Option.resetDefaultSetting(Option.java:1316) at com.baidu.input.pub.Option.(Option.java:199) at com.baidu.input.pub.Option.getInstance(Option.java:181) at com.baidu.input.ime.params.util.PrivacyDialogUtils.isAgreed(PrivacyDialogUtils.java:314) at com.baidu.input.cocomodule.privacy.PrivacyModule.isPrivacyAgreed(PrivacyModule.java:36) at com.baidu.input.privacy.impl.aspectj.PermissionAspect.isPrivacyAgree(PermissionAspect.java:218) at com.baidu.input.privacy.impl.aspectj.PermissionAspect.ajc$inlineAccessMethod$com_baidu_input_privacy_impl_aspectj_PermissionAspect$com_baidu_input_privacy_impl_aspectj_PermissionAspect$isPrivacyAgree(PermissionAspect.java:1) at com.baidu.input.privacy.impl.aspectj.PermissionAspect.getWifiInfo(PermissionAspect.java:157) at com.amitshekhar.utils.NetworkUtils.getAddressLog(NetworkUtils.java:38) at com.amitshekhar.DebugDB.initialize(DebugDB.java:62) at com.amitshekhar.debug.DebugDBInitProvider.onCreate(DebugDBInitProvider.java:44) at android.content.ContentProvider.attachInfo(ContentProvider.java:2120) at android.content.ContentProvider.attachInfo(ContentProvider.java:2093) at com.amitshekhar.debug.DebugDBInitProvider.attachInfo(DebugDBInitProvider.java:83) at android.app.ActivityThread.installProvider(ActivityThread.java:8181) at android.app.ActivityThread.installContentProviders(ActivityThread.java:7722)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7586)  at android.app.ActivityThread.access$2600(ActivityThread.java:259)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2440)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:219)  at android.app.ActivityThread.main(ActivityThread.java:8673)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)  2023-09-10 13:46:35.018 2398-2508 CrashWatcher com.baidu.input_mi E isNative = false, message : ["java.lang.RuntimeException: Unable to get provider com.amitshekhar.debug.DebugDBInitProvider: java.lang.IllegalStateException: You must call BDCommon.init first\n\tat android.app.ActivityThread.installProvider(ActivityThread.java:8186)\n\tat android.app.ActivityThread.installContentProviders(ActivityThread.java:7722)\n\tat android.app.ActivityThread.handleBindApplication(ActivityThread.java:7586)\n\tat android.app.ActivityThread.access$2600(ActivityThread.java:259)\n\tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:2440)\n\tat android.os.Handler.dispatchMessage(Handler.java:110)\n\tat android.os.Looper.loop(Looper.java:219)\n\tat android.app.ActivityThread.main(ActivityThread.java:8673)\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)\nCaused by: java.lang.IllegalStateException: You must call BDCommon.init first\n\tat com.baidu.input.common.BDCommon.getApp(BDCommon.java:38)\n\tat com.baidu.input.common.utils.DensityUtils.px2dp(DensityUtils.java:37)\n\tat com.baidu.input.gamekeyboard.model.FloatKeyBoardModel.restoreBorderValue(FloatKeyBoardModel.java:352)\n\tat com.baidu.input.gamekeyboard.model.FloatKeyBoardModel.restoreAllBorderData(FloatKeyBoardModel.java:549)\n\tat com.baidu.input.ime.floatmode.FloatModeManager.restoreAllBorderData(FloatModeManager.java:366)\n\tat com.baidu.input.pub.Option.resetDefaultSetting(Option.java:1316)\n\tat com.baidu.input.pub.Option.(Option.java:199)\n\tat com.baidu.input.pub.Option.getInstance(Option.java:181)\n\tat com.baidu.input.ime.params.util.PrivacyDialogUtils.isAgreed(PrivacyDialogUtils.java:314)\n\tat com.baidu.input.cocomodule.privacy.PrivacyModule.isPrivacyAgreed(PrivacyModule.java:36)\n\tat com.baidu.input.privacy.impl.aspectj.PermissionAspect.isPrivacyAgree(PermissionAspect.java:218)\n\tat com.baidu.input.privacy.impl.aspectj.PermissionAspect.ajc$inlineAccessMethod$com_baidu_input_privacy_impl_aspectj_PermissionAspect$com_baidu_input_privacy_impl_aspectj_PermissionAspect$isPrivacyAgree(PermissionAspect.java:1)\n\tat com.baidu.input.privacy.impl.aspectj.PermissionAspect.getWifiInfo(PermissionAspect.java:157)\n\tat com.amitshekhar.utils.NetworkUtils.getAddressLog(NetworkUtils.java:38)\n\tat com.amitshekhar.DebugDB.initialize(DebugDB.java:62)\n\tat com.amitshekhar.debug.DebugDBInitProvider.onCreate(DebugDBInitProvider.java:44)\n\tat android.content.ContentProvider.attachInfo(ContentProvider.java:2120)\n\tat android.content.ContentProvider.attachInfo(ContentProvider.java:2093)\n\tat com.amitshekhar.debug.DebugDBInitProvider.attachInfo(DebugDBInitProvider.java:83)\n\tat android.app.ActivityThread.installProvider(ActivityThread.java:8181)\n\t... 10 more\n",1,1694324794904,"10.6.121.496_F.1747.1.8",29,"HUAWEI","ALP-AL00","ALP-AL00 10.0.0.175(C00E175R2P4)","ALP-AL00","arm64-v8a","",3825725440,1274003456,false,false,"",0]

heyong2013 commented 1 year ago

this is no bug, relate to my project