How can I solve this problem:

E/flutter (18287): [ERROR:flutter/shell/common/] Dart Error: Dart_LookupLibrary: library 'package:background_fetch/background_fetch.dart' not found.
E/flutter (18287): [ERROR:flutter/runtime/] Could not resolve main entrypoint function.
E/flutter (18287): [ERROR:flutter/runtime/] Could not run the run main Dart entrypoint.
E/flutter (18287): [ERROR:flutter/runtime/] Could not create root isolate.
E/flutter (18287): [ERROR:flutter/shell/common/] Could not launch engine with configuration.

the problem just in the mode release, but in the mode debug the plugin is working normally.

More details:

[✓] Flutter (Channel master, 3.4.0-36.0.pre.8, on Ubuntu 22.04.1 LTS 5.15.0-48-generic, locale en_US.UTF-8) Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.2)
[✓] Android Studio (version 2021.3)
[✓] Android Studio
[✓] VS Code
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Thank you.

Solution 1: autop

add code>@pragma('vm:entry-point')</code to background entry-point function