小编Gus*_*arz的帖子

以 U+(版本 34 及更高版本)为目标不允许创建或检索带有 FLAG_MUTABLE 的 PendingIntent,这是 和 中的隐式 Intent

E/AndroidRuntime(15886): java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.IllegalArgumentException: br.com.cspautomacao.lazarus_comanda: Targeting U+ (version 34 and above) disallows creating or retrieving a PendingIntent with FLAG_MUTABLE, an implicit Intent within and without FLAG_NO_CREATE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for security reasons. To retrieve an already existing PendingIntent, use FLAG_NO_CREATE, however, to create a new PendingIntent with an implicit Intent use FLAG_IMMUTABLE.

\n

我更新到 Android SDK 34 后开始出现此错误。

\n

我的依赖项:

\n
dependencies {\n    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"\n        \n    // Depend\xc3\xaancias comuns\n    implementation fileTree(dir: "libs/comun", include: ['*.aar'])\n    implementation 'androidx.work:work-runtime-ktx:2.8.1'\n …
Run Code Online (Sandbox Code Playgroud)

android dart flutter

6
推荐指数
1
解决办法
1564
查看次数

标签 统计

android ×1

dart ×1

flutter ×1