/Users/mycomputer/.pub-cache/hosted/pub.dev/file_picker-8.1.5/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:257: error: cannot find symbol
if (registrar != null) {
^
symbol: variable registrar
location: class FilePickerPlugin
/Users/mycomputer/.pub-cache/hosted/pub.dev/file_picker-8.1.5/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:260: error: cannot find symbol
registrar.addActivityResultListener(this.delegate);
^
symbol: variable registrar
location: class FilePickerPlugin
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.
I’m getting the error with file_picker plugin, i have also delete the .gradle file but not getting help. I have also change the file_picker version but not getting help.
Thanks in advanced.
2
Answers
I was facing the same issue.
Go to
pubspec.yaml
and change file picker to exact this version :
They just updated their plugin. Download the latest version of file_picker.