android12版本出现的问题

java.lang.IllegalArgumentException: com.xx.xx: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E/AndroidRuntime(22288): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
E/AndroidRuntime(22288):     at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
E/AndroidRuntime(22288):     at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:458)
E/AndroidRuntime(22288):     at android.app.PendingIntent.getActivity(PendingIntent.java:444)
E/AndroidRuntime(22288):     at android.app.PendingIntent.getActivity(PendingIntent.java:408)
E/AndroidRuntime(22288):     at com.huawei.hms.api.b.getErrPendingIntent(HuaweiApiAvailabilityImpl.java:10)
E/AndroidRuntime(22288):     at com.huawei.hms.common.internal.BaseHmsClient.resolution(BaseHmsClient.java:3)
E/AndroidRuntime(22288):     at com.huawei.hms.common.internal.BaseHmsClient.checkAvailabilityAndConnect(BaseHmsClient.java:34)
E/AndroidRuntime(22288):     at com.huawei.hms.common.internal.BaseHmsClient.connect(BaseHmsClient.java:1)
E/AndroidRuntime(22288):     at com.huawei.hms.common.internal.HuaweiApiManager$ConnectionManager.connect(HuaweiApiManager.java:21)
E/AndroidRuntime(22288):     at com.huawei.hms.common.internal.HuaweiApiManager$ConnectionManager.sendRequest(HuaweiApiManager.java:24)
E/AndroidRuntime(22288):     at com.huawei.hms.common.internal.HuaweiApiManager.connectAndSendRequest(HuaweiApiManager.java:8)
E/AndroidRuntime(22288):     at com.huawei.hms.common.internal.HuaweiApiManager.handleMessage(HuaweiApiManager.java:7)
E/AndroidRuntime(22288):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(22288):     at android.os.Looper.loopOnce(Looper.java:210)
E/AndroidRuntime(22288):     at android.os.Looper.loop(Looper.java:299)
E/AndroidRuntime(22288):     at android.os.HandlerThread.run(HandlerThread.java:67)
I/HiAnalyticsSDK(22288): hmsSdk=> Begin to run EventRecordTask...

猜你喜欢

转载自blog.csdn.net/wxx314165038/article/details/123111529