Stu*_*wal 9 rest android android-pendingintent firebase android-studio
我已经找到了类似的答案,但对我的问题没有任何作用,因为我得到了这个异常-
面向 S+(版本 31 及更高版本)要求在创建 PendingIntent 时指定 FLAG_IMMUTABLE 或 FLAG_MUTABLE 之一。强烈考虑使用 FLAG_IMMUTABLE,仅当某些功能依赖于可变的 PendingIntent 时才使用 FLAG_MUTABLE,例如,如果需要与内联回复或气泡一起使用。
但这包含一个条件 -我没有在我的应用程序中使用任何 PendingIntent。所以很明显我无法改变使用它的格式。我有这些 firebase 依赖项-
implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'com.google.firebase:firebase-core:21.0.0'
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation 'com.google.firebase:firebase-iid:21.1.0' // add this
Run Code Online (Sandbox Code Playgroud)
有谁可以帮忙吗!!对于Android 12,我应该做什么简单的API调用在演示者层中使用改造和可观察和观察者
即使我没有亲自PendingIntent
在我的应用程序中使用过,但在接收推送消息时我也遇到了类似的错误。事实证明,错误来自于Firebase
库。我Firebase
通过替换以下内容来升级库build.gradle
:
implementation 'com.google.firebase:firebase-messaging:18.2.0'
Run Code Online (Sandbox Code Playgroud)
和
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation "com.google.firebase:firebase-iid:21.1.0"
Run Code Online (Sandbox Code Playgroud)
但这包含一个条件 - 我没有在我的应用程序中使用任何 PendingIntent 。
您的应用程序中的某些内容正在使用PendingIntent
. 它可能来自图书馆。完整的堆栈跟踪应该为您提供更多详细信息。
所以很明显我无法改变使用它的格式。
您可以使用库的更新版本来更改格式。例如,com.google.firebase:firebase-messaging
有23.0.6
可能解决该问题的补丁版本。如果您无法从堆栈跟踪中识别要更新的特定库,请确保所有库都是最新的。
归档时间: |
|
查看次数: |
8192 次 |
最近记录: |