open-im-flutter-demo
open-im-flutter-demo copied to clipboard
Bug: Build error for Android 12+
What happened?
flutter run
Launching lib/main.dart on sdk gphone arm64 in debug mode...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
/open-im-flutter-demo/android/app/src/debug/AndroidManifest.xml:26:9-37:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.huawei.hms.support.api.push.PushMsgReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/open-im-flutter-demo/android/app/src/debug/AndroidManifest.xml:38:9-49:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.huawei.hms.support.api.push.PushReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed with multiple errors, see logs
* 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 6s
Running Gradle task 'assembleDebug'... 7.0s
Error: Gradle task assembleDebug failed with exit code 1
What did you expect to happen?
flutter run for android:
How can we reproduce it (as minimally and precisely as possible)?
flutter run
Anything else we need to know?
No response
version
master
Cloud provider
non
OS version
No response