When attempting to build for Android with Flutter 3.0 you get the following error:
e: /Applications/flutter/.pub-cache/git/file_picker_writable-e1fe4af1792d8f5d92dedd1311a46a1ffc3dfa4c/android/src/main/kotlin/codeux/design/filepicker/file_picker_writable/FilePickerWritableImpl.kt: (31, 1): Class 'FilePickerWritableImpl' is not abstract and does not implement abstract member public abstract fun onNewIntent(p0: Intent): Boolean defined in io.flutter.plugin.common.PluginRegistry.NewIntentListener
e: /Applications/flutter/.pub-cache/git/file_picker_writable-e1fe4af1792d8f5d92dedd1311a46a1ffc3dfa4c/android/src/main/kotlin/codeux/design/filepicker/file_picker_writable/FilePickerWritableImpl.kt: (485, 3): 'onNewIntent' overrides nothing
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':file_picker_writable:compileDebugKotlin'.
> Compilation error. See log for more details
The issue is that the intent parameter of NewIntentListener#onNewIntent has been given a @NonNull annotation, which effectively changes the interface. Simply changing onNewIntent(intent: Intent?) in FilePickerWritableImpl.kt to onNewIntent(intent: Intent) will fix the problem for newer Flutter, but I don't know if the parameter could ever have been null in the past, so I'm not sure what to do about older Flutter versions.
When attempting to build for Android with Flutter 3.0 you get the following error:
The issue is that the
intent
parameter ofNewIntentListener#onNewIntent
has been given a@NonNull
annotation, which effectively changes the interface. Simply changingonNewIntent(intent: Intent?)
inFilePickerWritableImpl.kt
toonNewIntent(intent: Intent)
will fix the problem for newer Flutter, but I don't know if the parameter could ever have been null in the past, so I'm not sure what to do about older Flutter versions.