androidflutterkotlindartgeolocator

Geo locator giving error when added in project


Execution failed for task ':location:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details

After adding the Geo locator permission it is giving the above error.

Code snippet for pubspec.yaml

pubspec.yaml

I have add this dependency and and then did the AGP upgrade but not able to get a proper solution.


Solution

  • You can try adding dependencies like pubspec.yaml After that just try perform the above mentioned steps.

    1. flutter clean
    2. flutter pub get