I am working on a Flutter project and facing a build error when trying to run it on an Android device. Below is my pubspec.yaml file:
environment:
sdk: "3.7.0"
dependencies:
flutter:
sdk: flutter
file_picker: ^6.2.1
quill_html_editor: ^2.2.8
When I try to run my project using flutter run, I get the following errors:
Package quill_html_editor:android references quill_html_editor:android as the default plugin, but it does not provide an inline implementation.
Package file_picker:linux references file_picker:linux as the default plugin, but it does not provide an inline implementation.
/Users/mac/.pub-cache/hosted/pub.dev/file_picker-6.2.1/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:122: error: cannot find symbol
public static void registerWith(final io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
^
symbol: class Registrar
location: interface PluginRegistry
/Users/mac/.pub-cache/hosted/pub.dev/file_picker-6.2.1/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:251: error: cannot find symbol
final PluginRegistry.Registrar registrar,
^
symbol: class Registrar
location: interface PluginRegistry
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':file_picker:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for 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 53s
┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────┐
│ [!] Consult the error logs above to identify any broken plugins, specifically those containing │
│ "error: cannot find symbol..." │
│ This issue is likely caused by v1 embedding removal and the plugin's continued usage of removed │
│ references to the v1 embedding. │
│ To fix this error, please upgrade your current package's dependencies to latest versions by │
│ running `flutter pub upgrade`. │
│ If that does not work, please file an issue for the problematic plugin(s) here: │
│ https://github.com/flutter/flutter/issues │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
Exited (1).
Steps I have tried:
flutter clean and then flutter pub getflutter pub upgrade.pub-cache folder and reinstalling dependenciesQuestions:
file_picker or quill_html_editor that works with Flutter 3.7.0?Any help would be greatly appreciated!
To ensure compatibility with Flutter 3.29 (Dart 3.7.0), you need to use file_picker version 8.3.6 or higher. The quill_html_editor package has not been updated for a long time and relies on an unsupported version of file_picker, so it needs an update as well. You might consider forking the repository and using one of the pull requests that addresses this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With