HarmonyOS 鸿蒙Next 华为Android应用Notification奔溃
HarmonyOS 鸿蒙Next 华为Android应用Notification奔溃
Process Name: ‘com.shark.jizhang’ Thread Name: ‘main’ Back traces starts. java.lang.SecurityException: get package info: UID 1010310 requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS to access user 0. at android.os.Parcel.createExceptionOrNull(Parcel.java:2443) at android.os.Parcel.createException(Parcel.java:2427) at android.os.Parcel.readException(Parcel.java:2410) at android.os.Parcel.readException(Parcel.java:2352) at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:3693) at android.app.NotificationManager.notifyAsUser(NotificationManager.java:721) at android.app.NotificationManager.notify(NotificationManager.java:666) at androidx.core.app.NotificationManagerCompat.notify(NotificationManagerCompat.java:215) at androidx.core.app.NotificationManagerCompat.notify(NotificationManagerCompat.java:199) at com.shark.jizhang.module.notification.SharkQuickNotification.showNotification(SharkQuickNotification.java:73) at com.shark.jizhang.module.main.MainActivity.initSharkQuickNotification(MainActivity.java:806) at com.shark.jizhang.module.main.MainActivity.delayedInitAction1(MainActivity.java:1086) at com.shark.jizhang.module.main.MainActivity.lambda$bAsEB2-ifZ6o-Y0m2W4UxyHTEsE(MainActivity.java:0) at com.shark.jizhang.module.main.-$$Lambda$MainActivity$bAsEB2-ifZ6o-Y0m2W4UxyHTEsE.run(-.java:2) at android.os.Handler.handleCallback(Handler.java:966) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:293) at android.app.ActivityThread.loopProcess(ActivityThread.java:9986) at android.app.ActivityThread.main(ActivityThread.java:9975) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1240) Back traces ends.
HarmonyOS 鸿蒙Next 华为Android应用Notification崩溃可能由多种原因引起,如权限不足、系统兼容性问题、代码错误等。首先,请确保应用已获取必要的权限,如INTERACT_ACROSS_USERS_FULL
或INTERACT_ACROSS_USERS
。其次,检查应用与鸿蒙系统的兼容性,尝试更新应用和系统到最新版本。此外,使用日志工具查看崩溃时的日志信息,定位问题所在。如果问题依旧没法解决,请加我微信,我的微信是itying888。