If I want to use geolocator in my app, I get the following error message at build:
Xcode's output:
↳
=== BUILD TARGET geolocator OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/xxx/development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-3.0.1/ios/Classes/GeolocatorPlugin.m:4:17: error: definition of 'GeolocatorPlugin' must be imported from module 'geolocator.GeolocatorPlugin' before it is required
@implementation GeolocatorPlugin
^
In module 'geolocator' imported from /Users/xxx/development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-3.0.1/ios/Classes/GeolocatorPlugin.m:2:
/Users/xxx/Projecten/flutter/alpha3/alpha3/build/ios/Debug-iphonesimulator/geolocator/geolocator.framework/Headers/GeolocatorPlugin.h:3:12: note: previous definition is here
@interface GeolocatorPlugin : NSObject
^
1 error generated.
This is my flutter doctor summary:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.4 18E226, locale nl-NL)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
[!] Android Studio (version 3.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.33.0)
[✓] Connected device (1 available)
💬 Questions and Help
Hi All,
If I want to use geolocator in my app, I get the following error message at build:
Xcode's output: ↳ === BUILD TARGET geolocator OF PROJECT Pods WITH CONFIGURATION Debug === /Users/xxx/development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-3.0.1/ios/Classes/GeolocatorPlugin.m:4:17: error: definition of 'GeolocatorPlugin' must be imported from module 'geolocator.GeolocatorPlugin' before it is required @implementation GeolocatorPlugin ^ In module 'geolocator' imported from /Users/xxx/development/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-3.0.1/ios/Classes/GeolocatorPlugin.m:2: /Users/xxx/Projecten/flutter/alpha3/alpha3/build/ios/Debug-iphonesimulator/geolocator/geolocator.framework/Headers/GeolocatorPlugin.h:3:12: note: previous definition is here @interface GeolocatorPlugin : NSObject
^
1 error generated.
This is my flutter doctor summary: Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.4 18E226, locale nl-NL) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] iOS toolchain - develop for iOS devices (Xcode 10.2) [!] Android Studio (version 3.3) ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. [✓] VS Code (version 1.33.0) [✓] Connected device (1 available)
I try to run it on an iOS emulator.
Regards, Peter