簡體   English   中英

如何更正第三方庫中 android 12 上缺少的待處理意圖?

[英]How to correct missing pending intent on android 12 in a third party library?

我有一個使用未決意圖的第 3 方庫,因此我的應用程序在 android 12 上崩潰了:

java.lang.IllegalArgumentException:com.myapp:定位 S+(版本 31 及更高版本)要求在創建 PendingIntent 時指定 FLAG_IMMUTABLE 或 FLAG_MUTABLE 之一。 強烈考慮使用 FLAG_IMMUTABLE,僅當某些功能依賴於 PendingIntent 是可變的時才使用 FLAG_MUTABLE,例如,如果它需要與內聯回復或氣泡一起使用。 在 android.app.PendingIntent.checkFlags(PendingIntent.java:375)

我嘗試添加:

implementation 'androidx.work:work-runtime:2.7.1'

但錯誤仍在繼續。

我還嘗試添加:

allproject {
  project.configurations.all {
    resolutionStrategy {
      force 'androidx.work:work-runtime:2.7.0'
    }
  }
}

在我的 build.gradle 中什么都沒有。

我需要使用的庫是這個:

implementation 'org.puredata.android:pd-core:1.2.1-rc1'

<service android:name="org.puredata.android.service.PdService"
            android:foregroundServiceType="microphone|phoneCall" />

任何想法如何使它工作? 謝謝

在清單中的服務或活動中添加導出的標簽。 例如

android:exported="true"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM