How can i get current location on android device using flutter. I have tried both Location and GeoLocator plugins the GeoLocator 3.0.0 shows this error on debuging:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':app:preDebugBuild'.
Android dependency 'android.arch.lifecycle:runtime' has different version for the compile (1.0.0) and runtime (1.1.0) classpath. You should manually set the same version via DependencyResolution
Location 2.0.0 also throws an error on debugging. There is another plugin available named geoLocation but that is not compatible with dart 2.0. In such a situation how can i get location (longitude and latitude)[once]? Any help would be highly appreciated.