yoomoney / yookassa-android-sdk

This library allows implementing payment acceptance into mobile apps on Android. It works as an extension to the YooMoney API.
https://yookassa.ru/developers/payment-forms/android-sdk
MIT License
39 stars 22 forks source link

Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent #96

Open Extro5 opened 2 years ago

Extro5 commented 2 years ago

java.lang.IllegalArgumentException: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:375) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645) at android.app.PendingIntent.getBroadcast(PendingIntent.java:632) at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:196) at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:128) at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:93) at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:920)

https://developer.android.com/guide/components/intents-filters#DeclareMutabilityPendingIntent

iskandarshabaev commented 2 years ago

Подскажите, пожалуйста, версию targetSdk, compileSdkVersion и версию библиотеки которую используете

Extro5 commented 2 years ago

@iskandarshabaev targetSdkVersion = 31 compileSdkVersion=31 версия библиотеки: 6.4.4

iskandarshabaev commented 2 years ago
Extro5 commented 2 years ago

@iskandarshabaev

  1. При запуске приложения.
  2. У нас воспроизводится только на 12 андроиде. (На 10ке все норм).
SNechaev1 commented 2 years ago

таже ошибка на андроиде 12, исправьте уже, висит с ноября targetSdkVersion = 31 compileSdkVersion=31 версия библиотеки: 6.4.5

irininaelena commented 2 years ago

Доброго времени суток! Прошу прощения за долгий ответ. Добавьте, пожалуйста, к себе зависимость implementation 'androidx.work:work-runtime:2.7.1' в build.gradle, приложение должно перестать падать