Reputation: 21
environment: sdk: '>=3.0.1 <4.0.0'
location: ^4.4.0
FAILURE: Build failed with an exception.
What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':location' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20 getting this error while importing location plugin. my kotlin version 1.7.10 it is already updated. what is the solution of it?
expecting location plugin will be supported in environment: sdk: '>=3.0.1 <4.0.0'
Upvotes: 0
Views: 258
Reputation: 2576
The plugin has not been updated for a long time and that explains the reason why there's some kind of versioning issue. To fix this, someone else from the github repo cloned the library with the temporary fix until the original owner of the library updates the plugin.
I was able to reproduce the same issue you were having on my own device after using the plugin and then I tried the fix wherein you would have to change your dependency in the pubspec.yaml
from:
location: ^4.4.0
into this:
location:
git:
url: https://github.com/781flyingdutchman/flutterlocation.git
ref: V4
path: packages/location
And this fixes the exception error. But I would still recommend that you either wait the original owner of the plugin, or use a different one with latest updates.
Upvotes: 0