build failed after upgrade android gradle to 4.1.0
when I build the app
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
and get this error
e: /home/yswtrue/.pub-cache/hosted/pub.flutter-io.cn/twilio_programmable_video-0.6.1/android/src/main/kotlin/twilio/flutter/twilio_programmable_video/PluginHandler.kt: (146, 16): Type inference failed. Expected type mismatch: inferred type is Boolean? but Boolean was expected
e: /home/yswtrue/.pub-cache/hosted/pub.flutter-io.cn/twilio_programmable_video-0.6.1/android/src/main/kotlin/twilio/flutter/twilio_programmable_video/PluginHandler.kt: (146, 16): Type mismatch: inferred type is Boolean? but Boolean was expected
e: /home/yswtrue/.pub-cache/hosted/pub.flutter-io.cn/twilio_programmable_video-0.6.1/android/src/main/kotlin/twilio/flutter/twilio_programmable_video/PluginHandler.kt: (530, 48): Smart cast to 'AudioFocusRequest!' is impossible, because 'audioFocusRequest' is a mutable property that could have been changed by this time
e: /home/yswtrue/.pub-cache/hosted/pub.flutter-io.cn/twilio_programmable_video-0.6.1/android/src/main/kotlin/twilio/flutter/twilio_programmable_video/PluginHandler.kt: (558, 55): Smart cast to 'AudioFocusRequest' is impossible, because 'audioFocusRequest' is a mutable property that could have been changed by this time
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':twilio_programmable_video:compileReleaseKotlin'.
> Compilation error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 1s
Running Gradle task 'bundleRelease'...
Running Gradle task 'bundleRelease'... Done 122.3s (!)
Gradle task bundleRelease failed with exit code 1
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.1, on Linux, locale zh_CN.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version
30.0.2)
[✓] Android Studio (version 4.0)
[!] IntelliJ IDEA Ultimate Edition (version 2019.3)
✗ Flutter plugin not installed; this adds Flutter specific
functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
Android gradle version: 4.1.0
gradle version: 6.5.0
ext.kotlin_version = '1.3.75'