[英]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.