skip to Main Content

Android Studio – Unable to start activity: java.lang.IllegalArgumentException: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE

today my phone updated to android 12 and my app started to crash when I launch it. It is supposed to send a notification when launched. val intent = Intent(this, MainActivity::class.java) val pendingIntent: PendingIntent? = TaskStackBuilder.create(this).run { addNextIntentWithParentStack(intent) getPendingIntent(INTENT_REQUEST, PendingIntent.FLAG_IMMUTABLE)…

VIEW QUESTION
Back To Top
Search