build errors geolocation and geolocator

1,180 views
Skip to first unread message

hoek

unread,
Dec 18, 2018, 7:36:59 PM12/18/18
to Flutter Dev
Hi,
anyone know how to fix geolocator build?
Any help appreciated.
(File gradlew does not look like much fun to edit.)

Or are there other geolocation plugins?



---------------
pubspec.yaml: geolocator: '^2.1.1'
flutter run
Running "flutter packages get" in vollyapp...                0.4s
Launching lib/main.dart on SM G930V in debug mode...
Initializing gradle...                                       0.5s
Resolving dependencies...                                       
* Error running Gradle:
ProcessException: Process "/home/johan/vz/vollyapp/android/gradlew" exited abnormally:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':google_api_availability'.
> Failed to notify project evaluation listener.
   > java.lang.AbstractMethodError (no error message)

* 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 0s
  Command: /home/johan/vz/vollyapp/android/gradlew app:properties


Please review your Gradle project setup in the android/ folder.

----------------
Does not work either (not hard to understand why):
pubspec.yaml: geolocation: ^0.2.1
flutter run
Running "flutter packages get" in vollyapp...                   
The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.

Because vollyapp depends on geolocation >=0.1.1 which requires SDK version <2.0.0, version solving failed.
 
pub get failed (1)


-------------------
johan@beast:~/vz/vollyapp$ flutter doctor -v
[✓] Flutter (Channel beta, v1.0.0, on Linux, locale en_US.UTF-8)
    • Flutter version 1.0.0 at /home/johan/flutter
    • Framework revision 5391447fae (3 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /home/johan/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /usr/local/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.1)
    • Android Studio at /usr/local/android-studio
    • Flutter plugin version 28.0.2
    • Dart plugin version 181.5616
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)


[✓] Connected device (1 available)
    • SM G930V • fb7f666b • android-arm64 • Android 8.0.0 (API 26)


Rick Spencer

unread,
Dec 18, 2018, 8:21:08 PM12/18/18
to hoek, Flutter Dev
I'm . not sure what you are trying to do with your code, but based on
the name of the plugin that you are trying to use, perhaps something
here is helpful:

1. I use a plugin called "location"
(https://pub.dartlang.org/packages/location) and it works well for me.
2. If you want to see some code, you can see where I use it here:
https://github.com/rapido-mobile/rapido-flutter/blob/master/lib/src/map_point_form_field.dart
3. I am developing a library meant to simplify some common tasks,
perhaps it will help:
https://rapido-mobile.github.io/tutorials/flutter_maps_and_location.html
.

HTH

Cheers, Rick
> --
> You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

hoek

unread,
Dec 19, 2018, 10:50:33 PM12/19/18
to Flutter Dev
Thanks much Rick.
It has no build errors and works on Android and iOS with no problems.

The other two links look interesting.
I'm going to check them out some more when I get to the map part.

Mahalo,
Hoek
Reply all
Reply to author
Forward
0 new messages