【问题标题】:Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent定位 S+(版本 31 及更高版本)要求在创建 PendingIntent 时指定 FLAG_IMMUTABLE 或 FLAG_MUTABLE 之一
【发布时间】:2021-11-24 14:33:23
【问题描述】:

需要帮助。我收到三星手机用户在标题中描述的崩溃。 我已将FLAG_IMMUTABLE 作为myFlags or FLAG_IMMUTABLE 添加到我所有的PendingIntents 中。应用程序在我的 Pixel 3 上没有崩溃。 我已尝试添加 workmanager 版本 2.7.0,这是在其他类似问题的答案中推荐的,但它仍然崩溃。

有人对此有任何提示吗?

【问题讨论】:

  • 我在尝试 Firebase Auth UI 时发现了这个问题。其他帖子中没有答案有效。
  • 我从我的 paho.client.mqttv3 依赖项中收到此错误。
  • @JacobFerrero 谢谢,但我的项目中没有这个
  • paho.client.mqttv3 从 2020 年 7 月起没有更新。也许是这样?

标签: android android-pendingintent android-12


【解决方案1】:

我遇到了同样的错误,我只是找到了解决方案。

在我的依赖项中添加implementation 'com.google.android.gms:play-services-auth:19.2.0' 为我解决了错误。

其实这里https://github.com/firebase/FirebaseUI-Android#upgrading-dependencies指定的每一个依赖我都加了,都可以,所以我一一删除,发现纠正错误的是play-services-auth。

【讨论】:

  • 这可能会有所帮助,因为我有此依赖项的旧版本。 Thx,我稍后试试。此时我刚刚降级了版本。
猜你喜欢
  • 2022-10-05
  • 2022-01-08
  • 2021-09-29
  • 1970-01-01
  • 2023-01-01
  • 2021-09-14
  • 1970-01-01
  • 1970-01-01
  • 2023-01-30
相关资源
最近更新 更多