quick.flutter icon indicating copy to clipboard operation
quick.flutter copied to clipboard

[quick.usb] FLAG_IMMUTABLE error for targetSDK>=31

Open developerLEM opened this issue 1 year ago • 0 comments

Some info about the versions: Flutter 3.10.0 Dart 3.0.0 ext.kotlin_version = '1.9.10' classpath 'com.android.tools.build:gradle:7.4.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip

The problem: Asking USB permission, If I have targetSdkVersion<31 everything is ok, when I put targetSdkVersion >= 31 I have the following error:

java.lang.IllegalArgumentException: com.example.flutter_quickusb: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent

Is there a way to bypass the problem?

developerLEM avatar Sep 29 '23 14:09 developerLEM