Incompatible with Flutter 3.0 (Android)
Describe the bug
The plugin cannot compiled for Android with Flutter 3.0. Perhaps this affects iOS, too.
Yes, I tried running flutter clean first.
Expected behavior The plugin compiles.
Tested on:
- Compile time error
Other plugins:
- List of others Flutter plugins that could interfere
Additional logs
e: C:\Users\User\flutter\.pub-cache\hosted\pub.dartlang.org\location-4.3.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (124, 1): Class 'FlutterLocationService' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener
e: C:\Users\User\flutter\.pub-cache\hosted\pub.dartlang.org\location-4.3.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt: (258, 5): 'onRequestPermissionsResult' overrides nothing
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':location:compileReleaseKotlin'.
> Compilation error. See log for more details
any update, guys?
please do update guys? as soon as
This was what I followed to fix it.
Temporary fix:
Search for the FlutterLocationService.kt and edit it
change
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array
This was what I followed to fix it.
Temporary fix: Search for the FlutterLocationService.kt and edit it change override fun onRequestPermissionsResult(requestCode: Int, permissions: Array?, grantResults: IntArray?): Boolean to
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray): Boolean
You have to add array type Array<out String> (as you said Temporary fix )
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray): Boolean
This was what I followed to fix it.
Temporary fix: Search for the FlutterLocationService.kt and edit it change override fun onRequestPermissionsResult(requestCode: Int, permissions: Array?, grantResults: IntArray?): Boolean to
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray): Boolean
whats the directory?
This was what I followed to fix it. Temporary fix: Search for the FlutterLocationService.kt and edit it change override fun onRequestPermissionsResult(requestCode: Int, permissions: Array?, grantResults: IntArray?): Boolean to override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, grantResults: IntArray): Boolean
whats the directory? mine is this
"C:\Users\<YOUR_PC_USER>\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\location-4.3.0\android\src\main\java\com\lyokone\location\FlutterLocationService.kt"
@Lyokone This sounds like a rather urgent change. Would you be able to review, merge, and release this patch?
Hey, sorry not having a lot of time to maintain the package right now, should improve soon 🤞 I'm looking at that now
It's published in 4.4.0 Thanks for your help