Search code examples
flutterflutter-androidfluttermap

Execution failed for task ':location:compileDebugKotlin'


Execution failed for task ':location:compileDebugKotlin'.

Running Gradle task 'assembleDebug'... e: /Users/apple/.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: /Users/apple/.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:compileDebugKotlin'.

Compilation error. See log for more 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 4s Exception: Gradle task assembleDebug failed with exit code 1


Solution

  • Please go to this location -> Users/apple/.pub-cache/hosted/pub.dartlang.org, cut/move the location-4.3.0 folder and paste it somewhere, run your application afterwards and it should solve the problem.