Code Monkey home page Code Monkey logo

flutterlocation's People

Contributors

781flyingdutchman avatar alexays avatar bartekpacia avatar creativepsyco avatar g123k avatar gramatton avatar j-j-gajjar avatar joe-wd avatar kennethj avatar kevlatus avatar lidongze91 avatar long1eu avatar lorenzschueler avatar lyokone avatar m11an avatar maciejpigulski avatar matthewtsmith avatar mehmetf avatar michaelrfairhurst avatar miksen avatar pauldemarco avatar perrchick avatar prince2347x avatar quangio avatar sethladd avatar themisir avatar tyler-jewell avatar vagrantrobbie avatar willbryant avatar yixiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutterlocation's Issues

Speed Meter

Thanks for release this package. Just one more thing about this is Can you make location return current speed from Android API and IOS api as well?
I hope this will come soon. Thanks for doing a good job, man

NullPointerException on android

I try to make a basic function to get the current location when user ask it, it work fine the first time
but i keep getting this error when i call it again on real device and emulator with both API 26 and 27 :

E/AndroidRuntime(
5600): java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.EventChannel$EventSink.success(java.lang.Object)' on a null object reference
E/AndroidRuntime( 5600): at com.lyokone.location.LocationPlugin$2.onLocationResult(LocationPlugin.java:142)
E/AndroidRuntime( 5600): at com.google.android.gms.internal.location.zzau.notifyListener(Unknown Source:4)
E/AndroidRuntime( 5600): at com.google.android.gms.common.api.internal.ListenerHolder.notifyListenerInternal(Unknown Source:8)
E/AndroidRuntime( 5600): at com.google.android.gms.common.api.internal.ListenerHolder$zza.handleMessage(Unknown Source:14)
E/AndroidRuntime( 5600): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 5600): at android.os.Looper.loop(Looper.java:164)
E/AndroidRuntime( 5600): at android.app.ActivityThread.main(ActivityThread.java:6494)
E/AndroidRuntime( 5600): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 5600): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/AndroidRuntime( 5600): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

the code :

  _getLocation() async {
    var currentLocation = <String, double>{};
    var location = new Location();
    try {
      currentLocation = await location.onLocationChanged.first;
    } on PlatformException catch (e) {
      if (e.code == 'PERMISSION_DENIED') {
        print('Permission denied');
      } else if (e.code == 'PERMISSION_DENIED_NEVER_ASK') {
        print('Permission denied - never ask');
      } else {
        print(e);
      }
      currentLocation = null;
    }
    print(currentLocation);
    return currentLocation;
  }

PS: it work fine on emulator for IOS

Widget Enlightenment

Hi, newbie here using flutter. I just want some enlightenment on this widget/module. Because I'm planning to create a map where i call "loop all lat & lng from Firebase" w/ marker, and when i click one of those marker, a modal will pop-up and show the Name of that person.

Here are the things that i want to know.
(1) Is this something like Geolocation Watch?
(2) How to add marker if possible.
(3) Any documentation how to loop json fetch from Firebase or to make it short, a manual on how to use it.

Thank You.

Failed to get location

I'm getting the error when it calls

.invokeMethod('getLocation')

Future<Map<String, double>> get getLocation => _channel
.invokeMethod('getLocation')
.then((result) => result.cast<String, double>());

inside location.dart.

The message error is "Failed to get location"
The app asks for permition.

=============================================
(build.gradle)

buildscript {
repositories {
google()
jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.1.2'
    classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-4'
}

}

============================================
(pubspec.yaml)

dependencies:
flutter:
sdk: flutter
image_picker: 0.4.1
google_sign_in: 3.0.2
firebase_analytics: 0.3.3
firebase_auth: 0.5.5
firebase_database: 0.4.6
firebase_storage: 0.3.0
cached_network_image: "^0.4.1"
rxdart: ^0.16.7
cupertino_icons: ^0.1.0
photo_view: 0.0.2
flutter_map: ^0.0.1
location: 1.3.3
geohash: 0.1.1

==============================================
(messages)

Reloaded 3 of 651 libraries in 1.025ms.
E/flutter ( 8349): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter ( 8349): PlatformException(ERROR, Failed to get location., null)
E/flutter ( 8349): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:547:7)
E/flutter ( 8349): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
E/flutter ( 8349): <asynchronous suspension>
E/flutter ( 8349): #2      Location.getLocation (package:location/location.dart:12:8)
E/flutter ( 8349): #3      new ControllerLocation (package:flutter_chat/utils/geographic/ControllerLocation.dart:17:15)
E/flutter ( 8349): #4      _MyMapWidgetState.build (package:flutter_chat/pages/map_screen.dart:96:30)
E/flutter ( 8349): #5      StatefulElement.build (package:flutter/src/widgets/framework.dart:3730:27)
E/flutter ( 8349): #6      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3642:15)
E/flutter ( 8349): #7      Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter ( 8349): #8      StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
E/flutter ( 8349): #9      Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #10     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
E/flutter ( 8349): #11     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
E/flutter ( 8349): #12     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter ( 8349): #14     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter ( 8349): #15     ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
E/flutter ( 8349): #16     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #17     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter ( 8349): #18     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter ( 8349): #19     ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
E/flutter ( 8349): #20     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #21     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
E/flutter ( 8349): #22     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
E/flutter ( 8349): #23     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter ( 8349): #25     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter ( 8349): #26     StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
E/flutter ( 8349): #27     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #28     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter ( 8349): #29     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter ( 8349): #30     ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
E/flutter ( 8349): #31     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #32     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter ( 8349): #33     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter ( 8349): #34     StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
E/flutter ( 8349): #35     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #36     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
E/flutter ( 8349): #37     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #38     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter ( 8349): #39     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter ( 8349): #40     StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
E/flutter ( 8349): #41     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #42     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
E/flutter ( 8349): #43     Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
E/flutter ( 8349): #44     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter ( 8349): #45     Element.rebuild (package:flutter/src/widge

example app crashes

I'm sure I'm doing something wrong but the example app crashes.
This is using Android Studio targeting iOS using the simulator. I also got the same results when targeting my iPhone.
XXXXX below is really ("latitude"). When I included it along with the [] the preview blanked it out.
I'm just starting with Flutter so I'm sure this is an error on my part but a google search has turned up nothing. The following was copied from the console.

Launching lib/main.dart on iPad Air in debug mode...
Running Xcode clean...
Starting Xcode build...
Xcode build done
Syncing files to device iPad Air...
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building MyApp(dirty, state: _MyAppState#5aec3):
The method '[]' was called on null.
Receiver: null
Tried calling:[]XXXXX

When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
#1 _MyAppState.build (/Users/garyloudermilk/AndroidStudioProjects/flutter_app/lib/main.dart:64:107)
#2 StatefulElement.build (package:flutter/src/widgets/framework.dart:3713:27)
#3 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3625:15)
#4 Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
#5 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3605:5)
#6 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3741:22)
#7 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3600:5)
#8 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
#9 Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
#10 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:852:16)
#11 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:823:5)
#12 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:769:17)
#13 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2205:19)
#14 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:768:13)
#15 BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:657:7)
#16 runApp (package:flutter/src/widgets/binding.dart:699:7)
#17 main (/Users/garyloudermilk/AndroidStudioProjects/flutter_app/lib/main.dart:7:3)
#18 _startIsolate. (dart:isolate-patch/dart:isolate/isolate_patch.dart:279)
#19 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
════════════════════════════════════════════════════════════════════════════════════════════════════
*** First throw call stack:
(
0 CoreFoundation 0x0000000106a3712b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001060cbf41 objc_exception_throw + 48
2 CoreFoundation 0x0000000106aac245 +[NSException raise:format:] + 197
3 Runner 0x00000001042ce5e5 -[LocationPlugin handleMethodCall:result:] + 789
4 Flutter 0x00000001043a2785 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 118
5 Flutter 0x00000001043b8d53 _ZN5shell15PlatformViewIOS21HandlePlatformMessageEN3fxl6RefPtrIN5blink15PlatformMessageEEE + 189
6 Flutter 0x00000001043e12af _ZNSt3__110<…>
Lost connection to device.

Does not get the current location

I'm not sure this plugin is ready for use outside of the U.S.

When I open this app was greeted with a map location not based in my country.

image

crash java.lang.NoClassDefFoundError on Android

Android studio: 3.1.2
Flutter 0.4.4 • channel beta • https://github.com/flutter/flutter.git
Framework • revision f9bb4289e9 (4 weeks ago) • 2018-05-11 21:44:54 -0700
Engine • revision 06afdfe54e
Tools • Dart 2.0.0-dev.54.0.flutter-46ab040e58

location: "^1.3.4"
classpath 'com.android.tools.build:gradle:3.0.1

I am getting a crash when trying calling currentLocation = await location.getLocation; on the android simulator. On my iPhone, it works great.

Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.maps.GoogleMapOptions>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbfm;
I/zygote  ( 4800):   at void io.flutter.plugins.googlemaps.GoogleMapBuilder.<init>() (GoogleMapBuilder.java:15)
I/zygote  ( 4800):   at void io.flutter.plugins.googlemaps.GoogleMapsPlugin.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (GoogleMapsPlugin.java:73)
I/zygote  ( 4800):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:191)
I/zygote  ( 4800):   at void io.flutter.view.FlutterNativeView.handlePlatformMessage(java.lang.String, byte[], int) (FlutterNativeView.java:136)
I/zygote  ( 4800):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
I/zygote  ( 4800):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:325)
I/zygote  ( 4800):   at void android.os.Looper.loop() (Looper.java:142)
I/zygote  ( 4800):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6494)
I/zygote  ( 4800):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/zygote  ( 4800):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:438)
I/zygote  ( 4800):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:807)
I/zygote  ( 4800): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzbfm" on path: DexPathList[[zip file "/data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86, /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/base.apk!/lib/x86, /system/lib, /vendor/lib]]
I/zygote  ( 4800):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
I/zygote  ( 4800):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
I/zygote  ( 4800):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
I/zygote  ( 4800):   at void io.flutter.plugins.googlemaps.GoogleMapBuilder.<init>() (GoogleMapBuilder.java:15)
I/zygote  ( 4800):   at void io.flutter.plugins.googlemaps.GoogleMapsPlugin.onMethodCall(io.flutter.plugin.common.MethodCall, io.flutter.plugin.common.MethodChannel$Result) (GoogleMapsPlugin.java:73)
I/zygote  ( 4800):   at void io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(java.nio.ByteBuffer, io.flutter.plugin.common.BinaryMessenger$BinaryReply) (MethodChannel.java:191)
I/zygote  ( 4800):   at void io.flutter.view.FlutterNativeView.handlePlatformMessage(java.lang.String, byte[], int) (FlutterNativeView.java:136)
I/zygote  ( 4800):   at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
I/zygote  ( 4800):   at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:325)
I/zygote  ( 4800):   at void android.os.Looper.loop() (Looper.java:142)
I/zygote  ( 4800):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6494)
I/zygote  ( 4800):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
I/zygote  ( 4800):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:438)
I/zygote  ( 4800):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:807)
I/zygote  ( 4800):
F/flutter ( 4800): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(60)] Check failed: CheckException(env).
F/libc    ( 4800): Fatal signal 6 (SIGABRT), code -6 in tid 4800 (om.example.rajd), pid 4800 (om.example.rajd)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.1.0/OSM1.180201.021/4741582:userdebug/dev-keys'
Revision: '0'
ABI: 'x86'
pid: 4800, tid: 4800, name: om.example.rajd  >>> com.example.rajd <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(60)] Check failed: CheckException(env).
'
    eax 00000000  ebx 000012c0  ecx 000012c0  edx 00000006
    esi ed1aaab0  edi 000012c0
    xcs 00000023  xds 0000002b  xes 0000002b  xfs 0000006b  xss 0000002b
    eip f1a6caf0  ebp 0004e47d  esp ffa58108  flags 00200296
backtrace:
    #00 pc 00000af0  [vdso:f1a6c000] (__kernel_vsyscall+16)
    #01 pc 0001edf8  /system/lib/libc.so (syscall+40)
    #02 pc 0001f073  /system/lib/libc.so (abort+115)
    #03 pc 0032f3a2  /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86/libflutter.so
    #04 pc 0032fad7  /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86/libflutter.so
    #05 pc 00083584  /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86/libflutter.so
    #06 pc 00081a9a  /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86/libflutter.so
    #07 pc 000cf90b  /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86/libflutter.so
    #08 pc 00090e6a  /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86/libflutter.so
    #09 pc 00090a28  /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86/libflutter.so
    #10 pc 00095642  /data/app/com.example.rajd-2iYrqmSy64XuHxJACjTqDw==/lib/x86/libflutter.so
    #11 pc 00014af7  /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+39)
    #12 pc 00015936  /system/lib/libutils.so (android::Looper::pollInner(int)+982)
    #13 pc 000154d6  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+118)
    #14 pc 000e262b  /system/lib/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long long, int)+59)
    #15 pc 007d5428  /system/framework/x86/boot-framework.oat (offset 0x606000) (android.app.NativeActivity.onWindowFocusChangedNative [DEDUPED]+136)
    #16 pc 000015ee  /dev/ashmem/dalvik-jit-code-cache (deleted)
    #17 pc 4e3b4021  <unknown>
    #18 pc 0d3fffff  /dev/ashmem/dalvik-main space (region space) (deleted)
    #19 pc 0d3fffff  /dev/ashmem/dalvik-main space (region space) (deleted)

My App will be crash with plugin Map View

I don't know why it happended like this. it will be OK if I remove 1 in 2 plugin: Map View and Location package.
Can you guys have a look with this? Right now, we need "getSpeed" from your package and we also need Google Native Map from Map View Package?
Let me know if I can help you to do your work. Thanks for your time.
image

Need to define location accuracy

It seems the accuracy is set by default to kCLLocationAccuracyBest (on iOS). It would be nice to configure accuracy for faster fix or battery optimisation

2 calls to enable GPS and get a location

Hi,

I think the API is stuck on the await _location.onLocationChanged.firstWhere((d) => d != null); when the location is not enabled beforehand. The app still asks to enable the location but after enabling it, it's stuck.

If I want a location, I have to call my method again

Future _showMeAndCenter()async {
  // Platform messages may fail, so we use a try/catch PlatformException.
  try {
    //_currentLocation = await _location.getLocation;
    _location = new Location();
    _currentLocation = await _location.onLocationChanged.firstWhere((d) => d != null);
  } on Exception {
    _currentLocation = null;
  }
}

Publish to pub

Hi, can you please publish to pub this version. The current version on pub is outdated.

Thank you!

1.3 crashing with Permission denied

With the program gps_test2 set to use location 1.2, I find that the version with location 1.2 works and onchanged fires with updates. The pubspec.yaml uses 1.2.0. See the pubspec.yaml further down.

The same program gps_test2. I just change pubspec.yaml to "^1.2.0 and it crashes on permission denied. See pubspec.yaml further down.

See the run logs for each run further down

This is on Windows 10

## FLUTTER DOCTOR

C:\flutter_tests>flutter doctor -v
[v] Flutter (Channel beta, v0.4.4, on Microsoft Windows [Version 10.0.17134.48], locale en-GB)
• Flutter version 0.4.4 at c:\flutter_dev\flutter
• Framework revision f9bb4289e9 (2 weeks ago), 2018-05-11 21:44:54 -0700
• Engine revision 06afdfe54e
• Dart version 2.0.0-dev.54.0.flutter-46ab040e58

[v] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Users\john2\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.

[v] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 24.2.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[v] VS Code, 64-bit edition (version 1.23.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Dart Code extension version 2.12.1

[v] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)

• No issues found!


PUBSPEC.YAML FLUTTER LOCATION 1.2

``
name: gps_test2
description: A new Flutter project.

dependencies:
flutter:
sdk: flutter
location: "1.2.0"

The following adds the Cupertino Icons font to your application.
Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2

dev_dependencies:
flutter_test:
sdk: flutter

For information on the generic Dart part of this file, see the
following page: https://www.dartlang.org/tools/pub/pubspec

The following section is specific to Flutter.
flutter:

The following line ensures that the Material Icons font is
included with your application, so that you can use the icons in
the material Icons class.
uses-material-design: true

To add assets to your application, add an assets section, like this:
assets:
images/a_dot_burr.jpeg
images/a_dot_ham.jpeg

An image asset can refer to one or more resolution-specific "variants", see
https://flutter.io/assets-and-images/#resolution-aware.

For details regarding adding assets from package dependencies, see
https://flutter.io/assets-and-images/#from-packages

To add custom fonts to your application, add a fonts section here,
in this "flutter" section. Each entry in this list should have a
"family" key with the font family name, and a "fonts" key with a
list giving the asset and other descriptors for the font. For
example:
fonts:
family: Schyler
fonts:
asset: fonts/Schyler-Regular.ttf
asset: fonts/Schyler-Italic.ttf
style: italic
family: Trajan Pro
fonts:
asset: fonts/TrajanPro.ttf
asset: fonts/TrajanPro_Bold.ttf
weight: 700

For details regarding fonts from package dependencies,
see https://flutter.io/custom-fonts/#from-packages

PUBSPEC.YAML FLUTTER LOCATION 1.3

``

name: gps_test2
description: A new Flutter project.

dependencies:
flutter:
sdk: flutter
location: "^1.2.0"

The following adds the Cupertino Icons font to your application.
Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2

dev_dependencies:
flutter_test:
sdk: flutter

For information on the generic Dart part of this file, see the
following page: https://www.dartlang.org/tools/pub/pubspec

The following section is specific to Flutter.
flutter:

The following line ensures that the Material Icons font is
included with your application, so that you can use the icons in
the material Icons class.
uses-material-design: true

To add assets to your application, add an assets section, like this:
assets:
images/a_dot_burr.jpeg
images/a_dot_ham.jpeg

An image asset can refer to one or more resolution-specific "variants", see
https://flutter.io/assets-and-images/#resolution-aware.

For details regarding adding assets from package dependencies, see
https://flutter.io/assets-and-images/#from-packages

To add custom fonts to your application, add a fonts section here,
in this "flutter" section. Each entry in this list should have a
"family" key with the font family name, and a "fonts" key with a
list giving the asset and other descriptors for the font. For
example:
fonts:
family: Schyler
fonts:
asset: fonts/Schyler-Regular.ttf
asset: fonts/Schyler-Italic.ttf
style: italic
family: Trajan Pro
fonts:
asset: fonts/TrajanPro.ttf
asset: fonts/TrajanPro_Bold.ttf
weight: 700

For details regarding fonts from package dependencies,
see https://flutter.io/custom-fonts/#from-packages
``

FLUTTER LOCATION 1.3 run LOG

C:\flutter_tests\gps_test2>flutter run -v
[ +36 ms] [c:\flutter_dev\flutter] git rev-parse --abbrev-ref --symbolic @{u}
[ +55 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/beta
[ ] [c:\flutter_dev\flutter] git rev-parse --abbrev-ref HEAD
[ +29 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] beta
[ ] [c:\flutter_dev\flutter] git ls-remote --get-url origin
[ +27 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ ] [c:\flutter_dev\flutter] git log -n 1 --pretty=format:%H
[ +28 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] f9bb4289e9fd861d70ae78bcc3a042ef1b35cc9d
[ ] [c:\flutter_dev\flutter] git log -n 1 --pretty=format:%ar
[ +32 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 2 weeks ago
[ ] [c:\flutter_dev\flutter] git describe --match v*.. --first-parent --long --tags
[ +48 ms] Exit code 0 from: git describe --match v*.. --first-parent --long --tags
[ ] v0.4.4-0-gf9bb4289e
[ +234 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb devices -l
[ +15 ms] Exit code 0 from: C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb devices -l
[ ] List of devices attached
emulator-5554 device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:12
[ +104 ms] Found plugin location at C:\Users\john2\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\location-1.3.0
[ +100 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell getprop
[ +44 ms] ro.hardware = ranchu
[ +21 ms] Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
[ +567 ms] Launching lib/main.dart on Android SDK built for x86 in debug mode...
[ +7 ms] Initializing gradle...
[ ] Using gradle from C:\flutter_tests\gps_test2\android\gradlew.bat.
[ +127 ms] C:\flutter_tests\gps_test2\android\gradlew.bat -v
[ +598 ms]
------------------------------------------------------------
Gradle 4.1
------------------------------------------------------------

               Build time:   2017-08-07 14:38:48 UTC
               Revision:     941559e020f6c357ebb08d5c67acdb858a3defc2

               Groovy:       2.4.11
               Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
               JVM:          1.8.0_152-release (JetBrains s.r.o 25.152-b02)
               OS:           Windows 10 10.0 amd64

[ +3 ms] Resolving dependencies...
[ ] [android] C:\flutter_tests\gps_test2\android\gradlew.bat app:properties
[+2948 ms] :app:properties

               ------------------------------------------------------------
               Project :app
               ------------------------------------------------------------

               allprojects: [project ':app']
               android: com.android.build.gradle.AppExtension_Decorated@341a5792
               androidDependencies: task ':app:androidDependencies'
               ant: org.gradle.api.internal.project.DefaultAntBuilder@299044b8
               antBuilderFactory: org.gradle.api.internal.project.DefaultAntBuilderFactory@630aabe8
               archivesBaseName: app
               artifacts: org.gradle.api.internal.artifacts.dsl.DefaultArtifactHandler_Decorated@53e0597a
               asDynamicObject: DynamicObject for project ':app'
               assemble: task ':app:assemble'
               assembleAndroidTest: task ':app:assembleAndroidTest'
               assembleDebug: task ':app:assembleDebug'
               assembleDebugAndroidTest: task ':app:assembleDebugAndroidTest'
               assembleDebugUnitTest: task ':app:assembleDebugUnitTest'
               assembleProfile: task ':app:assembleProfile'
               assembleProfileUnitTest: task ':app:assembleProfileUnitTest'
               assembleRelease: task ':app:assembleRelease'
               assembleReleaseUnitTest: task ':app:assembleReleaseUnitTest'
               baseClassLoaderScope: org.gradle.api.internal.initialization.DefaultClassLoaderScope@35203253
               buildDependents: task ':app:buildDependents'
               buildDir: C:\flutter_tests\gps_test2\build\app
               buildFile: C:\flutter_tests\gps_test2\android\app\build.gradle
               buildNeeded: task ':app:buildNeeded'
               buildOutputs: BaseVariantOutput container
               buildScriptSource: org.gradle.groovy.scripts.UriScriptSource@1e3e05cb
               buildscript: org.gradle.api.internal.initialization.DefaultScriptHandler@28dda80f
               bundleAppClassesDebug: task ':app:bundleAppClassesDebug'
               bundleAppClassesDebugAndroidTest: task ':app:bundleAppClassesDebugAndroidTest'
               bundleAppClassesDebugUnitTest: task ':app:bundleAppClassesDebugUnitTest'
               bundleAppClassesProfile: task ':app:bundleAppClassesProfile'
               bundleAppClassesProfileUnitTest: task ':app:bundleAppClassesProfileUnitTest'
               bundleAppClassesRelease: task ':app:bundleAppClassesRelease'
               bundleAppClassesReleaseUnitTest: task ':app:bundleAppClassesReleaseUnitTest'
               check: task ':app:check'
               checkDebugManifest: task ':app:checkDebugManifest'
               checkProfileManifest: task ':app:checkProfileManifest'
               checkReleaseManifest: task ':app:checkReleaseManifest'
               childProjects: {}
               class: class org.gradle.api.internal.project.DefaultProject_Decorated
               classLoaderScope: org.gradle.api.internal.initialization.DefaultClassLoaderScope@79a70fe7
               cleanBuildCache: task ':app:cleanBuildCache'
               compileDebugAidl: task ':app:compileDebugAidl'
               compileDebugAndroidTestAidl: task ':app:compileDebugAndroidTestAidl'
               compileDebugAndroidTestJavaWithJavac: task ':app:compileDebugAndroidTestJavaWithJavac'
               compileDebugAndroidTestNdk: task ':app:compileDebugAndroidTestNdk'
               compileDebugAndroidTestRenderscript: task ':app:compileDebugAndroidTestRenderscript'
               compileDebugAndroidTestShaders: task ':app:compileDebugAndroidTestShaders'
               compileDebugAndroidTestSources: task ':app:compileDebugAndroidTestSources'
               compileDebugJavaWithJavac: task ':app:compileDebugJavaWithJavac'
               compileDebugNdk: task ':app:compileDebugNdk'
               compileDebugRenderscript: task ':app:compileDebugRenderscript'
               compileDebugShaders: task ':app:compileDebugShaders'
               compileDebugSources: task ':app:compileDebugSources'
               compileDebugUnitTestJavaWithJavac: task ':app:compileDebugUnitTestJavaWithJavac'
               compileDebugUnitTestSources: task ':app:compileDebugUnitTestSources'
               compileLint: task ':app:compileLint'
               compileProfileAidl: task ':app:compileProfileAidl'
               compileProfileJavaWithJavac: task ':app:compileProfileJavaWithJavac'
               compileProfileNdk: task ':app:compileProfileNdk'
               compileProfileRenderscript: task ':app:compileProfileRenderscript'
               compileProfileShaders: task ':app:compileProfileShaders'
               compileProfileSources: task ':app:compileProfileSources'
               compileProfileUnitTestJavaWithJavac: task ':app:compileProfileUnitTestJavaWithJavac'
               compileProfileUnitTestSources: task ':app:compileProfileUnitTestSources'
               compileReleaseAidl: task ':app:compileReleaseAidl'
               compileReleaseJavaWithJavac: task ':app:compileReleaseJavaWithJavac'
               compileReleaseNdk: task ':app:compileReleaseNdk'
               compileReleaseRenderscript: task ':app:compileReleaseRenderscript'
               compileReleaseShaders: task ':app:compileReleaseShaders'
               compileReleaseSources: task ':app:compileReleaseSources'
               compileReleaseUnitTestJavaWithJavac: task ':app:compileReleaseUnitTestJavaWithJavac'
               compileReleaseUnitTestSources: task ':app:compileReleaseUnitTestSources'
               components: SoftwareComponentInternal set
               configurationActions: org.gradle.configuration.project.DefaultProjectConfigurationActionContainer@4d21182a
               configurationTargetIdentifier: org.gradle.configuration.ConfigurationTargetIdentifier$1@235f5c18
               configurations: configuration container
               connectedAndroidTest: task ':app:connectedAndroidTest'
               connectedCheck: task ':app:connectedCheck'
               connectedDebugAndroidTest: task ':app:connectedDebugAndroidTest'
               consumeConfigAttr: task ':app:consumeConfigAttr'
               convention: org.gradle.api.internal.plugins.DefaultConvention@660715ac
               copyFlutterAssetsDebug: task ':app:copyFlutterAssetsDebug'
               copyFlutterAssetsProfile: task ':app:copyFlutterAssetsProfile'
               copyFlutterAssetsRelease: task ':app:copyFlutterAssetsRelease'
               createDebugCompatibleScreenManifests: task ':app:createDebugCompatibleScreenManifests'
               createProfileCompatibleScreenManifests: task ':app:createProfileCompatibleScreenManifests'
               createReleaseCompatibleScreenManifests: task ':app:createReleaseCompatibleScreenManifests'
               defaultArtifacts: org.gradle.api.internal.plugins.DefaultArtifactPublicationSet_Decorated@279ee6bc
               defaultTasks: []
               deferredProjectConfiguration: org.gradle.api.internal.project.DeferredProjectConfiguration@623b5a2d
               dependencies: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@3b5d65ee
               depth: 1
               description: null
               deviceAndroidTest: task ':app:deviceAndroidTest'
               deviceCheck: task ':app:deviceCheck'
               displayName: project ':app'
               distsDir: C:\flutter_tests\gps_test2\build\app\distributions
               distsDirName: distributions
               docsDir: C:\flutter_tests\gps_test2\build\app\docs
               docsDirName: docs
               ext: org.gradle.api.internal.plugins.DefaultExtraPropertiesExtension@6529bd5c
               extensions: org.gradle.api.internal.plugins.DefaultConvention@660715ac
               extractProguardFiles: task ':app:extractProguardFiles'
               fileOperations: org.gradle.api.internal.file.DefaultFileOperations@35d20c43
               fileResolver: org.gradle.api.internal.file.BaseDirFileResolver@d00c2e6
               flutter: FlutterExtension_Decorated@5da2b4bd
               flutterBuildDebug: task ':app:flutterBuildDebug'
               flutterBuildProfile: task ':app:flutterBuildProfile'
               flutterBuildRelease: task ':app:flutterBuildRelease'
               flutterBuildX86Jar: task ':app:flutterBuildX86Jar'
               generateDebugAndroidTestAssets: task ':app:generateDebugAndroidTestAssets'
               generateDebugAndroidTestBuildConfig: task ':app:generateDebugAndroidTestBuildConfig'
               generateDebugAndroidTestResValues: task ':app:generateDebugAndroidTestResValues'
               generateDebugAndroidTestResources: task ':app:generateDebugAndroidTestResources'
               generateDebugAndroidTestSources: task ':app:generateDebugAndroidTestSources'
               generateDebugAssets: task ':app:generateDebugAssets'
               generateDebugBuildConfig: task ':app:generateDebugBuildConfig'
               generateDebugResValues: task ':app:generateDebugResValues'
               generateDebugResources: task ':app:generateDebugResources'
               generateDebugSources: task ':app:generateDebugSources'
               generateProfileAssets: task ':app:generateProfileAssets'
               generateProfileBuildConfig: task ':app:generateProfileBuildConfig'
               generateProfileResValues: task ':app:generateProfileResValues'
               generateProfileResources: task ':app:generateProfileResources'
               generateProfileSources: task ':app:generateProfileSources'
               generateReleaseAssets: task ':app:generateReleaseAssets'
               generateReleaseBuildConfig: task ':app:generateReleaseBuildConfig'
               generateReleaseResValues: task ':app:generateReleaseResValues'
               generateReleaseResources: task ':app:generateReleaseResources'
               generateReleaseSources: task ':app:generateReleaseSources'
               gradle: build 'android'
               group: android
               identityPath: :app
               inheritedScope: org.gradle.api.internal.ExtensibleDynamicObject$InheritedDynamicObject@75c92108
               installDebug: task ':app:installDebug'
               installDebugAndroidTest: task ':app:installDebugAndroidTest'
               installProfile: task ':app:installProfile'
               installRelease: task ':app:installRelease'
               javaPreCompileDebug: task ':app:javaPreCompileDebug'
               javaPreCompileDebugAndroidTest: task ':app:javaPreCompileDebugAndroidTest'
               javaPreCompileDebugUnitTest: task ':app:javaPreCompileDebugUnitTest'
               javaPreCompileProfile: task ':app:javaPreCompileProfile'
               javaPreCompileProfileUnitTest: task ':app:javaPreCompileProfileUnitTest'
               javaPreCompileRelease: task ':app:javaPreCompileRelease'
               javaPreCompileReleaseUnitTest: task ':app:javaPreCompileReleaseUnitTest'
               layout: org.gradle.api.internal.file.DefaultProjectLayout@505c9be6
               libsDir: C:\flutter_tests\gps_test2\build\app\libs
               libsDirName: libs
               lint: task ':app:lint'
               lintDebug: task ':app:lintDebug'
               lintProfile: task ':app:lintProfile'
               lintRelease: task ':app:lintRelease'
               lintVitalRelease: task ':app:lintVitalRelease'
               logger: org.gradle.internal.logging.slf4j.OutputEventListenerBackedLogger@55875af3
               logging: org.gradle.internal.logging.services.DefaultLoggingManager@5bc064f9
               mergeDebugAndroidTestAssets: task ':app:mergeDebugAndroidTestAssets'
               mergeDebugAndroidTestJniLibFolders: task ':app:mergeDebugAndroidTestJniLibFolders'
               mergeDebugAndroidTestResources: task ':app:mergeDebugAndroidTestResources'
               mergeDebugAndroidTestShaders: task ':app:mergeDebugAndroidTestShaders'
               mergeDebugAssets: task ':app:mergeDebugAssets'
               mergeDebugJniLibFolders: task ':app:mergeDebugJniLibFolders'
               mergeDebugResources: task ':app:mergeDebugResources'
               mergeDebugShaders: task ':app:mergeDebugShaders'
               mergeProfileAssets: task ':app:mergeProfileAssets'
               mergeProfileJniLibFolders: task ':app:mergeProfileJniLibFolders'
               mergeProfileResources: task ':app:mergeProfileResources'
               mergeProfileShaders: task ':app:mergeProfileShaders'
               mergeReleaseAssets: task ':app:mergeReleaseAssets'
               mergeReleaseJniLibFolders: task ':app:mergeReleaseJniLibFolders'
               mergeReleaseResources: task ':app:mergeReleaseResources'
               mergeReleaseShaders: task ':app:mergeReleaseShaders'
               mockableAndroidJar: task ':app:mockableAndroidJar'
               modelRegistry: org.gradle.model.internal.registry.DefaultModelRegistry@138f3460
               modelSchemaStore: org.gradle.model.internal.manage.schema.extract.DefaultModelSchemaStore@3632ccae
               module: org.gradle.api.internal.artifacts.ProjectBackedModule@1790e59b
               name: app
               normalization: org.gradle.normalization.internal.DefaultInputNormalizationHandler_Decorated@2ff29678
               objects: org.gradle.api.internal.model.DefaultObjectFactory@7ee94bc2
               org.gradle.jvmargs: -Xmx1536M
               packageDebug: task ':app:packageDebug'
               packageDebugAndroidTest: task ':app:packageDebugAndroidTest'
               packageProfile: task ':app:packageProfile'
               packageRelease: task ':app:packageRelease'
               parent: root project 'android'
               parentIdentifier: root project 'android'
               path: :app
               platformAttrExtractor: task ':app:platformAttrExtractor'
               pluginManager: org.gradle.api.internal.plugins.DefaultPluginManager_Decorated@1b45abcb
               plugins: [org.gradle.api.plugins.HelpTasksPlugin@1123764, com.android.build.gradle.api.AndroidBasePlugin@28270fe1, org.gradle.language.base.plugins.LifecycleBasePlugin@252d383f, org.gradle.api.plugins.BasePlugin@7b622bf6, org.gradle.api.plugins.ReportingBasePlugin@3949e166, org.gradle.platform.base.plugins.ComponentBasePlugin@448a2760, org.gradle.language.base.plugins.LanguageBasePlugin@323eac46, org.gradle.platform.base.plugins.BinaryBasePlugin@2fc0a5af, org.gradle.api.plugins.JavaBasePlugin@64aec3fb, com.android.build.gradle.internal.coverage.JacocoPlugin@48f75330, com.android.build.gradle.AppPlugin@48ea1093, FlutterPlugin@278a17fa]
               preBuild: task ':app:preBuild'
               preDebugAndroidTestBuild: task ':app:preDebugAndroidTestBuild'
               preDebugBuild: task ':app:preDebugBuild'
               preDebugUnitTestBuild: task ':app:preDebugUnitTestBuild'
               preProfileBuild: task ':app:preProfileBuild'
               preProfileUnitTestBuild: task ':app:preProfileUnitTestBuild'
               preReleaseBuild: task ':app:preReleaseBuild'
               preReleaseUnitTestBuild: task ':app:preReleaseUnitTestBuild'
               prepareLintJar: task ':app:prepareLintJar'
               processDebugAndroidTestJavaRes: task ':app:processDebugAndroidTestJavaRes'
               processDebugAndroidTestManifest: task ':app:processDebugAndroidTestManifest'
               processDebugAndroidTestResources: task ':app:processDebugAndroidTestResources'
               processDebugJavaRes: task ':app:processDebugJavaRes'
               processDebugManifest: task ':app:processDebugManifest'
               processDebugResources: task ':app:processDebugResources'
               processDebugUnitTestJavaRes: task ':app:processDebugUnitTestJavaRes'
               processOperations: org.gradle.api.internal.file.DefaultFileOperations@35d20c43
               processProfileJavaRes: task ':app:processProfileJavaRes'
               processProfileManifest: task ':app:processProfileManifest'
               processProfileResources: task ':app:processProfileResources'
               processProfileUnitTestJavaRes: task ':app:processProfileUnitTestJavaRes'
               processReleaseJavaRes: task ':app:processReleaseJavaRes'
               processReleaseManifest: task ':app:processReleaseManifest'
               processReleaseResources: task ':app:processReleaseResources'
               processReleaseUnitTestJavaRes: task ':app:processReleaseUnitTestJavaRes'
               project: project ':app'
               projectConfigurator: org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator@43faf3f6
               projectDir: C:\flutter_tests\gps_test2\android\app
               projectEvaluationBroadcaster: ProjectEvaluationListener broadcast
               projectEvaluator: org.gradle.configuration.project.LifecycleProjectEvaluator@29bcf3dd
               projectPath: :app
               projectRegistry: org.gradle.api.internal.project.DefaultProjectRegistry@12c6f1c4
               properties: {...}
               providers: org.gradle.api.internal.provider.DefaultProviderFactory@5e42380b
               reporting: org.gradle.api.reporting.ReportingExtension_Decorated@246b0ba4
               reportsDir: C:\flutter_tests\gps_test2\build\app\reports
               repositories: repository container
               resolveConfigAttr: task ':app:resolveConfigAttr'
               resources: org.gradle.api.internal.resources.DefaultResourceHandler@301a299c
               rootDir: C:\flutter_tests\gps_test2\android
               rootProject: root project 'android'
               scriptHandlerFactory: org.gradle.api.internal.initialization.DefaultScriptHandlerFactory@7e761659
               scriptPluginFactory: org.gradle.configuration.ScriptPluginFactorySelector@5b9b8082
               serviceRegistryFactory: org.gradle.internal.service.scopes.ProjectScopeServices$4@27d1867e
               services: ProjectScopeServices
               signingReport: task ':app:signingReport'
               sourceCompatibility: 1.8
               sourceSets: SourceSet container
               splitsDiscoveryTaskDebug: task ':app:splitsDiscoveryTaskDebug'
               splitsDiscoveryTaskDebugAndroidTest: task ':app:splitsDiscoveryTaskDebugAndroidTest'
               splitsDiscoveryTaskProfile: task ':app:splitsDiscoveryTaskProfile'
               splitsDiscoveryTaskRelease: task ':app:splitsDiscoveryTaskRelease'
               standardOutputCapture: org.gradle.internal.logging.services.DefaultLoggingManager@5bc064f9
               state: project state 'EXECUTED'
               status: integration
               subprojects: []
               targetCompatibility: 1.8
               tasks: task set
               test: task ':app:test'
               testDebugUnitTest: task ':app:testDebugUnitTest'
               testProfileUnitTest: task ':app:testProfileUnitTest'
               testReleaseUnitTest: task ':app:testReleaseUnitTest'
               testReportDir: C:\flutter_tests\gps_test2\build\app\reports\tests
               testReportDirName: tests
               testResultsDir: C:\flutter_tests\gps_test2\build\app\test-results
               testResultsDirName: test-results
               transformClassesWithDexBuilderForDebug: task ':app:transformClassesWithDexBuilderForDebug'
               transformClassesWithDexBuilderForDebugAndroidTest: task ':app:transformClassesWithDexBuilderForDebugAndroidTest'
               transformClassesWithDexBuilderForProfile: task ':app:transformClassesWithDexBuilderForProfile'
               transformClassesWithPreDexForRelease: task ':app:transformClassesWithPreDexForRelease'
               transformDexArchiveWithDexMergerForDebug: task ':app:transformDexArchiveWithDexMergerForDebug'
               transformDexArchiveWithDexMergerForDebugAndroidTest: task ':app:transformDexArchiveWithDexMergerForDebugAndroidTest'
               transformDexArchiveWithDexMergerForProfile: task ':app:transformDexArchiveWithDexMergerForProfile'
               transformDexArchiveWithExternalLibsDexMergerForDebug: task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'
               transformDexArchiveWithExternalLibsDexMergerForDebugAndroidTest: task ':app:transformDexArchiveWithExternalLibsDexMergerForDebugAndroidTest'
               transformDexArchiveWithExternalLibsDexMergerForProfile: task ':app:transformDexArchiveWithExternalLibsDexMergerForProfile'
               transformDexWithDexForRelease: task ':app:transformDexWithDexForRelease'
               transformNativeLibsWithMergeJniLibsForDebug: task ':app:transformNativeLibsWithMergeJniLibsForDebug'
               transformNativeLibsWithMergeJniLibsForDebugAndroidTest: task ':app:transformNativeLibsWithMergeJniLibsForDebugAndroidTest'
               transformNativeLibsWithMergeJniLibsForProfile: task ':app:transformNativeLibsWithMergeJniLibsForProfile'
               transformNativeLibsWithMergeJniLibsForRelease: task ':app:transformNativeLibsWithMergeJniLibsForRelease'
               transformResourcesWithMergeJavaResForDebug: task ':app:transformResourcesWithMergeJavaResForDebug'
               transformResourcesWithMergeJavaResForDebugAndroidTest: task ':app:transformResourcesWithMergeJavaResForDebugAndroidTest'
               transformResourcesWithMergeJavaResForDebugUnitTest: task ':app:transformResourcesWithMergeJavaResForDebugUnitTest'
               transformResourcesWithMergeJavaResForProfile: task ':app:transformResourcesWithMergeJavaResForProfile'
               transformResourcesWithMergeJavaResForProfileUnitTest: task ':app:transformResourcesWithMergeJavaResForProfileUnitTest'
               transformResourcesWithMergeJavaResForRelease: task ':app:transformResourcesWithMergeJavaResForRelease'
               transformResourcesWithMergeJavaResForReleaseUnitTest: task ':app:transformResourcesWithMergeJavaResForReleaseUnitTest'
               uninstallAll: task ':app:uninstallAll'
               uninstallDebug: task ':app:uninstallDebug'
               uninstallDebugAndroidTest: task ':app:uninstallDebugAndroidTest'
               uninstallProfile: task ':app:uninstallProfile'
               uninstallRelease: task ':app:uninstallRelease'
               validateSigningDebug: task ':app:validateSigningDebug'
               validateSigningDebugAndroidTest: task ':app:validateSigningDebugAndroidTest'
               validateSigningProfile: task ':app:validateSigningProfile'
               validateSigningRelease: task ':app:validateSigningRelease'
               version: unspecified
               writeDebugApplicationId: task ':app:writeDebugApplicationId'
               writeProfileApplicationId: task ':app:writeProfileApplicationId'
               writeReleaseApplicationId: task ':app:writeReleaseApplicationId'

               BUILD SUCCESSFUL in 2s
               1 actionable task: 1 executed

[ +10 ms] C:\Users\john2\AppData\Local\Android\sdk\build-tools\27.0.3\aapt dump badging build\app\outputs\apk\app.apk
[ +9 ms] Exit code 0 from: C:\Users\john2\AppData\Local\Android\sdk\build-tools\27.0.3\aapt dump badging build\app\outputs\apk\app.apk
[ ] package: name='com.example.gpstest2' versionCode='1' versionName='1.0' platformBuildVersionName=''
sdkVersion:'16'
targetSdkVersion:'19'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
application-label:'gps_test2'
application-label-af:'gps_test2'
application-label-am:'gps_test2'
application-label-ar:'gps_test2'
application-label-az:'gps_test2'
application-label-be:'gps_test2'
application-label-bg:'gps_test2'
application-label-bn:'gps_test2'
application-label-bs:'gps_test2'
application-label-ca:'gps_test2'
application-label-cs:'gps_test2'
application-label-da:'gps_test2'
application-label-de:'gps_test2'
application-label-el:'gps_test2'
application-label-en-GB:'gps_test2'
application-label-es:'gps_test2'
application-label-es-US:'gps_test2'
application-label-et:'gps_test2'
application-label-eu:'gps_test2'
application-label-fa:'gps_test2'
application-label-fi:'gps_test2'
application-label-fr:'gps_test2'
application-label-fr-CA:'gps_test2'
application-label-gl:'gps_test2'
application-label-gu:'gps_test2'
application-label-hi:'gps_test2'
application-label-hr:'gps_test2'
application-label-hu:'gps_test2'
application-label-hy:'gps_test2'
application-label-in:'gps_test2'
application-label-is:'gps_test2'
application-label-it:'gps_test2'
application-label-iw:'gps_test2'
application-label-ja:'gps_test2'
application-label-ka:'gps_test2'
application-label-kk:'gps_test2'
application-label-km:'gps_test2'
application-label-kn:'gps_test2'
application-label-ko:'gps_test2'
application-label-ky:'gps_test2'
application-label-lo:'gps_test2'
application-label-lt:'gps_test2'
application-label-lv:'gps_test2'
application-label-mk:'gps_test2'
application-label-ml:'gps_test2'
application-label-mn:'gps_test2'
application-label-mr:'gps_test2'
application-label-ms:'gps_test2'
application-label-my:'gps_test2'
application-label-nb:'gps_test2'
application-label-ne:'gps_test2'
application-label-nl:'gps_test2'
application-label-pa:'gps_test2'
application-label-pl:'gps_test2'
application-label-pt-BR:'gps_test2'
application-label-pt-PT:'gps_test2'
application-label-ro:'gps_test2'
application-label-ru:'gps_test2'
application-label-si:'gps_test2'
application-label-sk:'gps_test2'
application-label-sl:'gps_test2'
application-label-sq:'gps_test2'
application-label-sr:'gps_test2'
application-label-sr-Latn:'gps_test2'
application-label-sv:'gps_test2'
application-label-sw:'gps_test2'
application-label-ta:'gps_test2'
application-label-te:'gps_test2'
application-label-th:'gps_test2'
application-label-tl:'gps_test2'
application-label-tr:'gps_test2'
application-label-uk:'gps_test2'
application-label-ur:'gps_test2'
application-label-uz:'gps_test2'
application-label-vi:'gps_test2'
application-label-zh-CN:'gps_test2'
application-label-zh-HK:'gps_test2'
application-label-zh-TW:'gps_test2'
application-label-zu:'gps_test2'
application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
application: label='gps_test2' icon='res/mipmap-mdpi-v4/ic_launcher.png'
application-debuggable
launchable-activity: name='com.example.gpstest2.MainActivity' label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
uses-feature: name='android.hardware.location.gps'
uses-implied-feature: name='android.hardware.location.gps' reason='requested android.permission.ACCESS_FINE_LOCATION permission, and targetSdkVersion < 21'
uses-feature: name='android.hardware.location.network'
uses-implied-feature: name='android.hardware.location.network' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and targetSdkVersion < 21'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '----' 'af' 'am' 'ar' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-GB' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu' 'hy' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'pa' 'pl' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'sk' 'sl' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '160' '240' '320' '480' '640'
native-code: 'armeabi-v7a' 'x86' 'x86_64'
[ +7 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 logcat -v time -t 1
[ +36 ms] Exit code 0 from: C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 logcat -v time -t 1
[ ] --------- beginning of main
05-29 15:23:27.258 I/DeviceStateChecker( 7772): DeviceStateChecker cancelled
[ +2 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 logcat -v time
[ +332 ms] DependencyChecker: C:\flutter_tests\gps_test2.packages is newer than 2018-05-29 15:50:06.000
[ +4 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb version
[ +15 ms] Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb.EXE
[ +2 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb start-server
[ +27 ms] Building APK
[ +8 ms] Running 'gradlew assembleDebug'...
[ +3 ms] [android] C:\flutter_tests\gps_test2\android\gradlew.bat -Ptarget=C:\flutter_tests\gps_test2\lib/main.dart -Ppreview-dart-2=true -Pfilesystem-scheme=org-dartlang-root assembleDebug
[+1344 ms] :app:preBuild UP-TO-DATE
[ ] :location:preBuild UP-TO-DATE
[ ] :location:preDebugBuild UP-TO-DATE
[ +2 ms] :location:checkDebugManifest
[ ] :location:processDebugManifest UP-TO-DATE
[+1281 ms] :app:preDebugBuild
[ +96 ms] :location:compileDebugAidl
[ +1 ms] :app:compileDebugAidl UP-TO-DATE
[ ] :location:packageDebugRenderscript NO-SOURCE
[ +10 ms] :app:compileDebugRenderscript UP-TO-DATE
[ +1 ms] :app:flutterBuildX86Jar UP-TO-DATE
[ +1 ms] :app:checkDebugManifest UP-TO-DATE
[ +1 ms] :app:generateDebugBuildConfig UP-TO-DATE
[ ] :app:prepareLintJar UP-TO-DATE
[ +15 ms] :app:cleanMergeDebugAssets
[ +87 ms] :app:flutterBuildDebug UP-TO-DATE
[ +3 ms] :app:mergeDebugShaders UP-TO-DATE
[ ] :app:compileDebugShaders UP-TO-DATE
[ ] :app:generateDebugAssets UP-TO-DATE
[ +6 ms] :location:mergeDebugShaders UP-TO-DATE
[ ] :location:compileDebugShaders UP-TO-DATE
[ ] :location:generateDebugAssets UP-TO-DATE
[ +11 ms] :location:mergeDebugAssets UP-TO-DATE
[ +10 ms] :app:mergeDebugAssets
[ +393 ms] :app:copyFlutterAssetsDebug
[ +1 ms] :app:generateDebugResValues UP-TO-DATE
[ ] :app:generateDebugResources UP-TO-DATE
[ ] :location:compileDebugRenderscript UP-TO-DATE
[ ] :location:generateDebugResValues UP-TO-DATE
[ ] :location:generateDebugResources UP-TO-DATE
[ +8 ms] :location:packageDebugResources UP-TO-DATE
[+12383 ms] :app:mergeDebugResources
[ ] :app:createDebugCompatibleScreenManifests UP-TO-DATE
[ +449 ms] :app:processDebugManifest
[ +1 ms] :app:splitsDiscoveryTaskDebug UP-TO-DATE
[ +1 ms] :location:platformAttrExtractor UP-TO-DATE
[+1618 ms] :location:processDebugResources
[+3714 ms] :app:processDebugResources
[ ] :app:generateDebugSources
[ ] :location:generateDebugBuildConfig UP-TO-DATE
[ ] :location:prepareLintJar UP-TO-DATE
[ ] :location:generateDebugSources
[+2160 ms] :location:javaPreCompileDebug
[+3333 ms] :location:compileDebugJavaWithJavac
[ ] :location:processDebugJavaRes NO-SOURCE
[ +215 ms] :location:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
[ +279 ms] :app:javaPreCompileDebug
[+1394 ms] :app:compileDebugJavaWithJavac
[ +1 ms] :app:compileDebugNdk NO-SOURCE
[ ] :app:compileDebugSources
[+3675 ms] :app:transformClassesWithDexBuilderForDebug
[ +596 ms] :app:transformDexArchiveWithExternalLibsDexMergerForDebug
[ +121 ms] :app:transformDexArchiveWithDexMergerForDebug
[ ] :app:mergeDebugJniLibFolders UP-TO-DATE
[ +10 ms] :location:compileDebugNdk NO-SOURCE
[ +1 ms] :location:mergeDebugJniLibFolders UP-TO-DATE
[ ] :location:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
[ +1 ms] :location:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
[+1632 ms] :app:transformNativeLibsWithMergeJniLibsForDebug
[ +2 ms] :app:processDebugJavaRes NO-SOURCE
[+4111 ms] :app:transformResourcesWithMergeJavaResForDebug
[ +2 ms] :app:validateSigningDebug
[+4272 ms] :app:packageDebug
[ ] :app:assembleDebug
[+1388 ms] :location:extractDebugAnnotations
[ +8 ms] :location:mergeDebugConsumerProguardFiles UP-TO-DATE
[ +6 ms] :location:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
[ +158 ms] :location:transformClassesAndResourcesWithSyncLibJarsForDebug
[ ] :location:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE
[ +54 ms] :location:bundleDebug
[ +1 ms] :location:compileDebugSources
[ ] :location:assembleDebug
[ ] BUILD SUCCESSFUL in 44s
[ ] 54 actionable tasks: 25 executed, 29 up-to-date
[ +959 ms] calculateSha: C:\flutter_tests\gps_test2\build\app\outputs\apk/app.apk
[ +404 ms] Built build\app\outputs\apk\debug\app-debug.apk.
[ +1 ms] C:\Users\john2\AppData\Local\Android\sdk\build-tools\27.0.3\aapt dump badging build\app\outputs\apk\app.apk
[ +12 ms] Exit code 0 from: C:\Users\john2\AppData\Local\Android\sdk\build-tools\27.0.3\aapt dump badging build\app\outputs\apk\app.apk
[ ] package: name='com.example.gpstest2' versionCode='1' versionName='1.0' platformBuildVersionName=''
sdkVersion:'16'
targetSdkVersion:'19'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
application-label:'gps_test2'
application-label-af:'gps_test2'
application-label-am:'gps_test2'
application-label-ar:'gps_test2'
application-label-az:'gps_test2'
application-label-be:'gps_test2'
application-label-bg:'gps_test2'
application-label-bn:'gps_test2'
application-label-bs:'gps_test2'
application-label-ca:'gps_test2'
application-label-cs:'gps_test2'
application-label-da:'gps_test2'
application-label-de:'gps_test2'
application-label-el:'gps_test2'
application-label-en-AU:'gps_test2'
application-label-en-GB:'gps_test2'
application-label-en-IN:'gps_test2'
application-label-es:'gps_test2'
application-label-es-US:'gps_test2'
application-label-et:'gps_test2'
application-label-eu:'gps_test2'
application-label-fa:'gps_test2'
application-label-fi:'gps_test2'
application-label-fr:'gps_test2'
application-label-fr-CA:'gps_test2'
application-label-gl:'gps_test2'
application-label-gu:'gps_test2'
application-label-hi:'gps_test2'
application-label-hr:'gps_test2'
application-label-hu:'gps_test2'
application-label-hy:'gps_test2'
application-label-in:'gps_test2'
application-label-is:'gps_test2'
application-label-it:'gps_test2'
application-label-iw:'gps_test2'
application-label-ja:'gps_test2'
application-label-ka:'gps_test2'
application-label-kk:'gps_test2'
application-label-km:'gps_test2'
application-label-kn:'gps_test2'
application-label-ko:'gps_test2'
application-label-ky:'gps_test2'
application-label-lo:'gps_test2'
application-label-lt:'gps_test2'
application-label-lv:'gps_test2'
application-label-mk:'gps_test2'
application-label-ml:'gps_test2'
application-label-mn:'gps_test2'
application-label-mr:'gps_test2'
application-label-ms:'gps_test2'
application-label-my:'gps_test2'
application-label-nb:'gps_test2'
application-label-ne:'gps_test2'
application-label-nl:'gps_test2'
application-label-pa:'gps_test2'
application-label-pl:'gps_test2'
application-label-pt:'gps_test2'
application-label-pt-BR:'gps_test2'
application-label-pt-PT:'gps_test2'
application-label-ro:'gps_test2'
application-label-ru:'gps_test2'
application-label-si:'gps_test2'
application-label-sk:'gps_test2'
application-label-sl:'gps_test2'
application-label-sq:'gps_test2'
application-label-sr:'gps_test2'
application-label-sr-Latn:'gps_test2'
application-label-sv:'gps_test2'
application-label-sw:'gps_test2'
application-label-ta:'gps_test2'
application-label-te:'gps_test2'
application-label-th:'gps_test2'
application-label-tl:'gps_test2'
application-label-tr:'gps_test2'
application-label-uk:'gps_test2'
application-label-ur:'gps_test2'
application-label-uz:'gps_test2'
application-label-vi:'gps_test2'
application-label-zh-CN:'gps_test2'
application-label-zh-HK:'gps_test2'
application-label-zh-TW:'gps_test2'
application-label-zu:'gps_test2'
application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
application: label='gps_test2' icon='res/mipmap-mdpi-v4/ic_launcher.png'
application-debuggable
launchable-activity: name='com.example.gpstest2.MainActivity' label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
uses-feature: name='android.hardware.location.gps'
uses-implied-feature: name='android.hardware.location.gps' reason='requested android.permission.ACCESS_FINE_LOCATION permission, and targetSdkVersion < 21'
uses-feature: name='android.hardware.location.network'
uses-implied-feature: name='android.hardware.location.network' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and targetSdkVersion < 21'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--
--' 'af' 'am' 'ar' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-GB' 'en-IN' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu' 'hy' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'pa' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'sk' 'sl' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '160' '240' '320' '480' '640'
native-code: 'armeabi-v7a' 'x86' 'x86_64'
[ +1 ms] Stopping app 'app.apk' on Android SDK built for x86.
[ ] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell am force-stop com.example.gpstest2
[ +243 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell pm list packages com.example.gpstest2
[ +224 ms] package:com.example.gpstest2
[ +2 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell cat /data/local/tmp/sky.com.example.gpstest2.sha1
[ +35 ms] /system/bin/sh: cat: /data/local/tmp/sky.com.example.gpstest2.sha1: No such file or directory
[ ] Installing APK.
[ +1 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb version
[ +15 ms] Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb.EXE
[ ] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb start-server
[ +15 ms] Installing build\app\outputs\apk\app.apk...
[ ] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 install -r build\app\outputs\apk\app.apk
[+5508 ms] Success
[ +2 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell echo -n bd143a9ba6a6ae1dc5b377be55fbacb16651e13e > /data/local/tmp/sky.com.example.gpstest2.sha1
[ +45 ms] Android SDK built for x86 startApp
[ +2 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true com.example.gpstest2/com.example.gpstest2.MainActivity
[ +500 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.gpstest2/.MainActivity (has extras) }
[ ] Waiting for observatory port to be available...
[+2169 ms] I/FlutterActivityDelegate( 2160): onResume setting current activity to this
[ +24 ms] Observatory URL on device: http://127.0.0.1:45313/
[ +6 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 forward tcp:8100 tcp:45313
[ +18 ms] Forwarded host port 8100 to device port 45313 for Observatory
[ +7 ms] Connecting to service protocol: http://127.0.0.1:8100/
[ +379 ms] Successfully connected to service protocol: http://127.0.0.1:8100/
[ +4 ms] getVM: {}
[ +53 ms] getIsolate: {isolateId: isolates/651578406}
[ +3 ms] _flutter.listViews: {}
[+1019 ms] DevFS: Creating new filesystem on the device (null)
[ +1 ms] _createDevFS: {fsName: gps_test2}
[ +27 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.gpstest2/cache/gps_test2NRNMNM/gps_test2/)
[ +2 ms] Updating assets
[ +209 ms] I/flutter ( 2160): GOT 2nd InitState
[ ] I/flutter ( 2160): LOCATION-1{altitude: 0.0, latitude: 51.5219983, longitude: -0.0543, accuracy: 12.303000450134277}
[ +33 ms] I/flutter ( 2160): LOCATION CHANGED2{altitude: 0.0, latitude: 51.5219983, longitude: -0.0543, accuracy: 12.303000450134277}

**## [ +64 ms] D/AndroidRuntime( 2160): Shutting down VM
[ ] E/AndroidRuntime( 2160): FATAL EXCEPTION: main
[ ] E/AndroidRuntime( 2160): Process: com.example.gpstest2, PID: 2160
[ ] E/AndroidRuntime( 2160): java.lang.RuntimeException: Location permission denied
[ ] E/AndroidRuntime( 2160): at com.lyokone.location.LocationPlugin$2.onLocationResult(LocationPlugin.java:141)
[ ] E/AndroidRuntime( 2160): at

com.google.android.gms.internal.location.zzau.notifyListener(Unknown Source)**
[ ] E/AndroidRuntime( 2160): at com.google.android.gms.common.api.internal.ListenerHolder.notifyListenerInternal(Unknown Source)
[ ] E/AndroidRuntime( 2160): at com.google.android.gms.common.api.internal.ListenerHolder$zza.handleMessage(Unknown Source)
[ ] E/AndroidRuntime( 2160): at android.os.Handler.dispatchMessage(Handler.java:102)
[ ] E/AndroidRuntime( 2160): at android.os.Looper.loop(Looper.java:154)
[ ] E/AndroidRuntime( 2160): at android.app.ActivityThread.main(ActivityThread.java:6119)
[ ] E/AndroidRuntime( 2160): at java.lang.reflect.Method.invoke(Native Method)
[ ] E/AndroidRuntime( 2160): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
[ ] E/AndroidRuntime( 2160): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
[ +248 ms] D/ ( 2160): HostConnection::get() New Host Connection established 0x9b4e26c0, tid 2190
[ +15 ms] D/EGL_emulation( 2160): eglMakeCurrent: 0x9b488480: ver 3 0 (tinfo 0x9b4fb7e0)
[ +22 ms] I/flutter ( 2160): LOCATION CHANGED{altitude: 0.0, latitude: 51.5219983, longitude: -0.0543, accuracy: 12.303000450134277}
[ +902 ms] Syncing files to device Android SDK built for x86...
[ +7 ms] DevFS: Starting sync from LocalDirectory: 'C:\flutter_tests\gps_test2'
[ ] Scanning project files
[ +7 ms] Scanning package files
[ +145 ms] Scanning asset files
[ +1 ms] Scanning for deleted files
[ +27 ms] Compiling dart to kernel with 415 updated files
[ +5 ms] c:\flutter_dev\flutter\bin\cache\dart-sdk\bin\dart c:\flutter_dev\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root c:\flutter_dev\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --strong --target=flutter --output-dill build\app.dill --packages C:\flutter_tests\gps_test2.packages --filesystem-scheme org-dartlang-root
[+4778 ms] Updating files
[ +288 ms] DevFS sync failed. Lost connection to device: SocketException: Write failed (OS Error: An existing connection was forcibly closed by the remote host.
, errno = 10054), address = 127.0.0.1, port = 61079
[ +22 ms] "flutter run" took 68,533ms.

#0 throwToolExit (package:flutter_tools/src/base/common.dart:28)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:405)

#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:344)

#3 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:279)

#4 AppContext.run. (package:flutter_tools/src/base/context.dart:142)

#5 _rootRun (dart:async/zone.dart:1126)
#6 _CustomZone.run (dart:async/zone.dart:1023)
#7 runZoned (dart:async/zone.dart:1501)
#8 AppContext.run (package:flutter_tools/src/base/context.dart:141)

#9 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:270)
#10 CommandRunner.runCommand (package:args/command_runner.dart:194)

#11 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:309)

#12 AppContext.run. (package:flutter_tools/src/base/context.dart:142)

#13 _rootRun (dart:async/zone.dart:1126)
#14 _CustomZone.run (dart:async/zone.dart:1023)
#15 runZoned (dart:async/zone.dart:1501)
#16 AppContext.run (package:flutter_tools/src/base/context.dart:141)

#17 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:265)

#18 CommandRunner.run. (package:args/command_runner.dart:109)
#19 new Future.sync (dart:async/future.dart:222)
#20 CommandRunner.run (package:args/command_runner.dart:109)
#21 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:174)
#22 run. (package:flutter_tools/runner.dart:54)

#23 AppContext.run. (package:flutter_tools/src/base/context.dart:142)

#24 _rootRun (dart:async/zone.dart:1126)
#25 _CustomZone.run (dart:async/zone.dart:1023)
#26 runZoned (dart:async/zone.dart:1501)
#27 AppContext.run (package:flutter_tools/src/base/context.dart:141)

#28 runInContext (package:flutter_tools/src/context_runner.dart:43)

#29 run (package:flutter_tools/runner.dart:49)
#30 main (package:flutter_tools/executable.dart:49)

#31 main (file:///c:/flutter_dev/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#32 _startIsolate. (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#33 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

[ +12 ms] Retrying writing "build/flutter_assets/LICENSE" to DevFS due to error: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:8100/
[ +1 ms] Retrying writing "build/flutter_assets/FontManifest.json" to DevFS due to error: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:8100/
[ +1 ms] Retrying writing "build/flutter_assets/AssetManifest.json" to DevFS due to error: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:8100/
[ +1 ms] Retrying writing "build/flutter_assets/fonts/MaterialIcons-Regular.ttf" to DevFS due to error: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:8100/
[ +1 ms] Retrying writing "build/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf" to DevFS due to error: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:8100/
[ +6 ms] Service protocol connection closed.
[ ] Lost connection to device.

C:\flutter_tests\gps_test2>


## FLUTTER LOCATION 1.2 RUN

C:\flutter_tests\gps_test2>flutter run -v
[ +37 ms] [c:\flutter_dev\flutter] git rev-parse --abbrev-ref --symbolic @{u}
[ +57 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ +1 ms] origin/beta
[ ] [c:\flutter_dev\flutter] git rev-parse --abbrev-ref HEAD
[ +26 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] beta
[ ] [c:\flutter_dev\flutter] git ls-remote --get-url origin
[ +29 ms] Exit code 0 from: git ls-remote --get-url origin
[ +1 ms] https://github.com/flutter/flutter.git
[ ] [c:\flutter_dev\flutter] git log -n 1 --pretty=format:%H
[ +28 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] f9bb4289e9fd861d70ae78bcc3a042ef1b35cc9d
[ ] [c:\flutter_dev\flutter] git log -n 1 --pretty=format:%ar
[ +25 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 2 weeks ago
[ ] [c:\flutter_dev\flutter] git describe --match v*.. --first-parent --long --tags
[ +28 ms] Exit code 0 from: git describe --match v*.. --first-parent --long --tags
[ ] v0.4.4-0-gf9bb4289e
[ +318 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb devices -l
[ +16 ms] Exit code 0 from: C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb devices -l
[ ] List of devices attached
emulator-5554 device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:12
[ +102 ms] Found plugin location at C:\Users\john2\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\location-1.2.0
[ +160 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell getprop
[ +39 ms] ro.hardware = ranchu
[ +21 ms] Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
[ +548 ms] Launching lib/main.dart on Android SDK built for x86 in debug mode...
[ +7 ms] Initializing gradle...
[ ] Using gradle from C:\flutter_tests\gps_test2\android\gradlew.bat.
[ +120 ms] C:\flutter_tests\gps_test2\android\gradlew.bat -v
[ +527 ms]
------------------------------------------------------------
Gradle 4.1
------------------------------------------------------------

               Build time:   2017-08-07 14:38:48 UTC
               Revision:     941559e020f6c357ebb08d5c67acdb858a3defc2

               Groovy:       2.4.11
               Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
               JVM:          1.8.0_152-release (JetBrains s.r.o 25.152-b02)
               OS:           Windows 10 10.0 amd64

[ +6 ms] Resolving dependencies...
[ ] [android] C:\flutter_tests\gps_test2\android\gradlew.bat app:properties
[+2244 ms] :app:properties

               ------------------------------------------------------------
               Project :app
               ------------------------------------------------------------

               allprojects: [project ':app']
               android: com.android.build.gradle.AppExtension_Decorated@a5d7a7a
               androidDependencies: task ':app:androidDependencies'
               ant: org.gradle.api.internal.project.DefaultAntBuilder@29cef977
               antBuilderFactory: org.gradle.api.internal.project.DefaultAntBuilderFactory@cfadcc9
               archivesBaseName: app
               artifacts: org.gradle.api.internal.artifacts.dsl.DefaultArtifactHandler_Decorated@1122eab5
               asDynamicObject: DynamicObject for project ':app'
               assemble: task ':app:assemble'
               assembleAndroidTest: task ':app:assembleAndroidTest'
               assembleDebug: task ':app:assembleDebug'
               assembleDebugAndroidTest: task ':app:assembleDebugAndroidTest'
               assembleDebugUnitTest: task ':app:assembleDebugUnitTest'
               assembleProfile: task ':app:assembleProfile'
               assembleProfileUnitTest: task ':app:assembleProfileUnitTest'
               assembleRelease: task ':app:assembleRelease'
               assembleReleaseUnitTest: task ':app:assembleReleaseUnitTest'
               baseClassLoaderScope: org.gradle.api.internal.initialization.DefaultClassLoaderScope@70cdcc41
               buildDependents: task ':app:buildDependents'
               buildDir: C:\flutter_tests\gps_test2\build\app
               buildFile: C:\flutter_tests\gps_test2\android\app\build.gradle
               buildNeeded: task ':app:buildNeeded'
               buildOutputs: BaseVariantOutput container
               buildScriptSource: org.gradle.groovy.scripts.UriScriptSource@2e96866e
               buildscript: org.gradle.api.internal.initialization.DefaultScriptHandler@74d00be1
               bundleAppClassesDebug: task ':app:bundleAppClassesDebug'
               bundleAppClassesDebugAndroidTest: task ':app:bundleAppClassesDebugAndroidTest'
               bundleAppClassesDebugUnitTest: task ':app:bundleAppClassesDebugUnitTest'
               bundleAppClassesProfile: task ':app:bundleAppClassesProfile'
               bundleAppClassesProfileUnitTest: task ':app:bundleAppClassesProfileUnitTest'
               bundleAppClassesRelease: task ':app:bundleAppClassesRelease'
               bundleAppClassesReleaseUnitTest: task ':app:bundleAppClassesReleaseUnitTest'
               check: task ':app:check'
               checkDebugManifest: task ':app:checkDebugManifest'
               checkProfileManifest: task ':app:checkProfileManifest'
               checkReleaseManifest: task ':app:checkReleaseManifest'
               childProjects: {}
               class: class org.gradle.api.internal.project.DefaultProject_Decorated
               classLoaderScope: org.gradle.api.internal.initialization.DefaultClassLoaderScope@72a1308c
               cleanBuildCache: task ':app:cleanBuildCache'
               compileDebugAidl: task ':app:compileDebugAidl'
               compileDebugAndroidTestAidl: task ':app:compileDebugAndroidTestAidl'
               compileDebugAndroidTestJavaWithJavac: task ':app:compileDebugAndroidTestJavaWithJavac'
               compileDebugAndroidTestNdk: task ':app:compileDebugAndroidTestNdk'
               compileDebugAndroidTestRenderscript: task ':app:compileDebugAndroidTestRenderscript'
               compileDebugAndroidTestShaders: task ':app:compileDebugAndroidTestShaders'
               compileDebugAndroidTestSources: task ':app:compileDebugAndroidTestSources'
               compileDebugJavaWithJavac: task ':app:compileDebugJavaWithJavac'
               compileDebugNdk: task ':app:compileDebugNdk'
               compileDebugRenderscript: task ':app:compileDebugRenderscript'
               compileDebugShaders: task ':app:compileDebugShaders'
               compileDebugSources: task ':app:compileDebugSources'
               compileDebugUnitTestJavaWithJavac: task ':app:compileDebugUnitTestJavaWithJavac'
               compileDebugUnitTestSources: task ':app:compileDebugUnitTestSources'
               compileLint: task ':app:compileLint'
               compileProfileAidl: task ':app:compileProfileAidl'
               compileProfileJavaWithJavac: task ':app:compileProfileJavaWithJavac'
               compileProfileNdk: task ':app:compileProfileNdk'
               compileProfileRenderscript: task ':app:compileProfileRenderscript'
               compileProfileShaders: task ':app:compileProfileShaders'
               compileProfileSources: task ':app:compileProfileSources'
               compileProfileUnitTestJavaWithJavac: task ':app:compileProfileUnitTestJavaWithJavac'
               compileProfileUnitTestSources: task ':app:compileProfileUnitTestSources'
               compileReleaseAidl: task ':app:compileReleaseAidl'
               compileReleaseJavaWithJavac: task ':app:compileReleaseJavaWithJavac'
               compileReleaseNdk: task ':app:compileReleaseNdk'
               compileReleaseRenderscript: task ':app:compileReleaseRenderscript'
               compileReleaseShaders: task ':app:compileReleaseShaders'
               compileReleaseSources: task ':app:compileReleaseSources'
               compileReleaseUnitTestJavaWithJavac: task ':app:compileReleaseUnitTestJavaWithJavac'
               compileReleaseUnitTestSources: task ':app:compileReleaseUnitTestSources'
               components: SoftwareComponentInternal set
               configurationActions: org.gradle.configuration.project.DefaultProjectConfigurationActionContainer@6c10555d
               configurationTargetIdentifier: org.gradle.configuration.ConfigurationTargetIdentifier$1@762f0b47
               configurations: configuration container
               connectedAndroidTest: task ':app:connectedAndroidTest'
               connectedCheck: task ':app:connectedCheck'
               connectedDebugAndroidTest: task ':app:connectedDebugAndroidTest'
               consumeConfigAttr: task ':app:consumeConfigAttr'
               convention: org.gradle.api.internal.plugins.DefaultConvention@2549960
               copyFlutterAssetsDebug: task ':app:copyFlutterAssetsDebug'
               copyFlutterAssetsProfile: task ':app:copyFlutterAssetsProfile'
               copyFlutterAssetsRelease: task ':app:copyFlutterAssetsRelease'
               createDebugCompatibleScreenManifests: task ':app:createDebugCompatibleScreenManifests'
               createProfileCompatibleScreenManifests: task ':app:createProfileCompatibleScreenManifests'
               createReleaseCompatibleScreenManifests: task ':app:createReleaseCompatibleScreenManifests'
               defaultArtifacts: org.gradle.api.internal.plugins.DefaultArtifactPublicationSet_Decorated@790aecf6
               defaultTasks: []
               deferredProjectConfiguration: org.gradle.api.internal.project.DeferredProjectConfiguration@175ee437
               dependencies: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@19a5b0a8
               depth: 1
               description: null
               deviceAndroidTest: task ':app:deviceAndroidTest'
               deviceCheck: task ':app:deviceCheck'
               displayName: project ':app'
               distsDir: C:\flutter_tests\gps_test2\build\app\distributions
               distsDirName: distributions
               docsDir: C:\flutter_tests\gps_test2\build\app\docs
               docsDirName: docs
               ext: org.gradle.api.internal.plugins.DefaultExtraPropertiesExtension@3f9cb565
               extensions: org.gradle.api.internal.plugins.DefaultConvention@2549960
               extractProguardFiles: task ':app:extractProguardFiles'
               fileOperations: org.gradle.api.internal.file.DefaultFileOperations@11df933c
               fileResolver: org.gradle.api.internal.file.BaseDirFileResolver@71c0a26c
               flutter: FlutterExtension_Decorated@45d46c0c
               flutterBuildDebug: task ':app:flutterBuildDebug'
               flutterBuildProfile: task ':app:flutterBuildProfile'
               flutterBuildRelease: task ':app:flutterBuildRelease'
               flutterBuildX86Jar: task ':app:flutterBuildX86Jar'
               generateDebugAndroidTestAssets: task ':app:generateDebugAndroidTestAssets'
               generateDebugAndroidTestBuildConfig: task ':app:generateDebugAndroidTestBuildConfig'
               generateDebugAndroidTestResValues: task ':app:generateDebugAndroidTestResValues'
               generateDebugAndroidTestResources: task ':app:generateDebugAndroidTestResources'
               generateDebugAndroidTestSources: task ':app:generateDebugAndroidTestSources'
               generateDebugAssets: task ':app:generateDebugAssets'
               generateDebugBuildConfig: task ':app:generateDebugBuildConfig'
               generateDebugResValues: task ':app:generateDebugResValues'
               generateDebugResources: task ':app:generateDebugResources'
               generateDebugSources: task ':app:generateDebugSources'
               generateProfileAssets: task ':app:generateProfileAssets'
               generateProfileBuildConfig: task ':app:generateProfileBuildConfig'
               generateProfileResValues: task ':app:generateProfileResValues'
               generateProfileResources: task ':app:generateProfileResources'
               generateProfileSources: task ':app:generateProfileSources'
               generateReleaseAssets: task ':app:generateReleaseAssets'
               generateReleaseBuildConfig: task ':app:generateReleaseBuildConfig'
               generateReleaseResValues: task ':app:generateReleaseResValues'
               generateReleaseResources: task ':app:generateReleaseResources'
               generateReleaseSources: task ':app:generateReleaseSources'
               gradle: build 'android'
               group: android
               identityPath: :app
               inheritedScope: org.gradle.api.internal.ExtensibleDynamicObject$InheritedDynamicObject@1fb9de4e
               installDebug: task ':app:installDebug'
               installDebugAndroidTest: task ':app:installDebugAndroidTest'
               installProfile: task ':app:installProfile'
               installRelease: task ':app:installRelease'
               javaPreCompileDebug: task ':app:javaPreCompileDebug'
               javaPreCompileDebugAndroidTest: task ':app:javaPreCompileDebugAndroidTest'
               javaPreCompileDebugUnitTest: task ':app:javaPreCompileDebugUnitTest'
               javaPreCompileProfile: task ':app:javaPreCompileProfile'
               javaPreCompileProfileUnitTest: task ':app:javaPreCompileProfileUnitTest'
               javaPreCompileRelease: task ':app:javaPreCompileRelease'
               javaPreCompileReleaseUnitTest: task ':app:javaPreCompileReleaseUnitTest'
               layout: org.gradle.api.internal.file.DefaultProjectLayout@7292f8f6
               libsDir: C:\flutter_tests\gps_test2\build\app\libs
               libsDirName: libs
               lint: task ':app:lint'
               lintDebug: task ':app:lintDebug'
               lintProfile: task ':app:lintProfile'
               lintRelease: task ':app:lintRelease'
               lintVitalRelease: task ':app:lintVitalRelease'
               logger: org.gradle.internal.logging.slf4j.OutputEventListenerBackedLogger@55875af3
               logging: org.gradle.internal.logging.services.DefaultLoggingManager@6b5f70a
               mergeDebugAndroidTestAssets: task ':app:mergeDebugAndroidTestAssets'
               mergeDebugAndroidTestJniLibFolders: task ':app:mergeDebugAndroidTestJniLibFolders'
               mergeDebugAndroidTestResources: task ':app:mergeDebugAndroidTestResources'
               mergeDebugAndroidTestShaders: task ':app:mergeDebugAndroidTestShaders'
               mergeDebugAssets: task ':app:mergeDebugAssets'
               mergeDebugJniLibFolders: task ':app:mergeDebugJniLibFolders'
               mergeDebugResources: task ':app:mergeDebugResources'
               mergeDebugShaders: task ':app:mergeDebugShaders'
               mergeProfileAssets: task ':app:mergeProfileAssets'
               mergeProfileJniLibFolders: task ':app:mergeProfileJniLibFolders'
               mergeProfileResources: task ':app:mergeProfileResources'
               mergeProfileShaders: task ':app:mergeProfileShaders'
               mergeReleaseAssets: task ':app:mergeReleaseAssets'
               mergeReleaseJniLibFolders: task ':app:mergeReleaseJniLibFolders'
               mergeReleaseResources: task ':app:mergeReleaseResources'
               mergeReleaseShaders: task ':app:mergeReleaseShaders'
               mockableAndroidJar: task ':app:mockableAndroidJar'
               modelRegistry: org.gradle.model.internal.registry.DefaultModelRegistry@60674fdc
               modelSchemaStore: org.gradle.model.internal.manage.schema.extract.DefaultModelSchemaStore@3632ccae
               module: org.gradle.api.internal.artifacts.ProjectBackedModule@203afa68
               name: app
               normalization: org.gradle.normalization.internal.DefaultInputNormalizationHandler_Decorated@317da630
               objects: org.gradle.api.internal.model.DefaultObjectFactory@7ee94bc2
               org.gradle.jvmargs: -Xmx1536M
               packageDebug: task ':app:packageDebug'
               packageDebugAndroidTest: task ':app:packageDebugAndroidTest'
               packageProfile: task ':app:packageProfile'
               packageRelease: task ':app:packageRelease'
               parent: root project 'android'
               parentIdentifier: root project 'android'
               path: :app
               platformAttrExtractor: task ':app:platformAttrExtractor'
               pluginManager: org.gradle.api.internal.plugins.DefaultPluginManager_Decorated@544dbda1
               plugins: [org.gradle.api.plugins.HelpTasksPlugin@691c4ef3, com.android.build.gradle.api.AndroidBasePlugin@3609f381, org.gradle.language.base.plugins.LifecycleBasePlugin@128819de, org.gradle.api.plugins.BasePlugin@557ed85d, org.gradle.api.plugins.ReportingBasePlugin@74ee23a6, org.gradle.platform.base.plugins.ComponentBasePlugin@44093cc0, org.gradle.language.base.plugins.LanguageBasePlugin@41ffc4f4, org.gradle.platform.base.plugins.BinaryBasePlugin@1cd8c8d, org.gradle.api.plugins.JavaBasePlugin@4e934544, com.android.build.gradle.internal.coverage.JacocoPlugin@39b71e60, com.android.build.gradle.AppPlugin@37a61ad1, FlutterPlugin@1f85ed0b]
               preBuild: task ':app:preBuild'
               preDebugAndroidTestBuild: task ':app:preDebugAndroidTestBuild'
               preDebugBuild: task ':app:preDebugBuild'
               preDebugUnitTestBuild: task ':app:preDebugUnitTestBuild'
               preProfileBuild: task ':app:preProfileBuild'
               preProfileUnitTestBuild: task ':app:preProfileUnitTestBuild'
               preReleaseBuild: task ':app:preReleaseBuild'
               preReleaseUnitTestBuild: task ':app:preReleaseUnitTestBuild'
               prepareLintJar: task ':app:prepareLintJar'
               processDebugAndroidTestJavaRes: task ':app:processDebugAndroidTestJavaRes'
               processDebugAndroidTestManifest: task ':app:processDebugAndroidTestManifest'
               processDebugAndroidTestResources: task ':app:processDebugAndroidTestResources'
               processDebugJavaRes: task ':app:processDebugJavaRes'
               processDebugManifest: task ':app:processDebugManifest'
               processDebugResources: task ':app:processDebugResources'
               processDebugUnitTestJavaRes: task ':app:processDebugUnitTestJavaRes'
               processOperations: org.gradle.api.internal.file.DefaultFileOperations@11df933c
               processProfileJavaRes: task ':app:processProfileJavaRes'
               processProfileManifest: task ':app:processProfileManifest'
               processProfileResources: task ':app:processProfileResources'
               processProfileUnitTestJavaRes: task ':app:processProfileUnitTestJavaRes'
               processReleaseJavaRes: task ':app:processReleaseJavaRes'
               processReleaseManifest: task ':app:processReleaseManifest'
               processReleaseResources: task ':app:processReleaseResources'
               processReleaseUnitTestJavaRes: task ':app:processReleaseUnitTestJavaRes'
               project: project ':app'
               projectConfigurator: org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator@7de91d85
               projectDir: C:\flutter_tests\gps_test2\android\app
               projectEvaluationBroadcaster: ProjectEvaluationListener broadcast
               projectEvaluator: org.gradle.configuration.project.LifecycleProjectEvaluator@27aab44b
               projectPath: :app
               projectRegistry: org.gradle.api.internal.project.DefaultProjectRegistry@7b3acaa8
               properties: {...}
               providers: org.gradle.api.internal.provider.DefaultProviderFactory@5e42380b
               reporting: org.gradle.api.reporting.ReportingExtension_Decorated@42a3d0db
               reportsDir: C:\flutter_tests\gps_test2\build\app\reports
               repositories: repository container
               resolveConfigAttr: task ':app:resolveConfigAttr'
               resources: org.gradle.api.internal.resources.DefaultResourceHandler@7713e83f
               rootDir: C:\flutter_tests\gps_test2\android
               rootProject: root project 'android'
               scriptHandlerFactory: org.gradle.api.internal.initialization.DefaultScriptHandlerFactory@5e9127a
               scriptPluginFactory: org.gradle.configuration.ScriptPluginFactorySelector@282bf7e5
               serviceRegistryFactory: org.gradle.internal.service.scopes.ProjectScopeServices$4@7452cf33
               services: ProjectScopeServices
               signingReport: task ':app:signingReport'
               sourceCompatibility: 1.8
               sourceSets: SourceSet container
               splitsDiscoveryTaskDebug: task ':app:splitsDiscoveryTaskDebug'
               splitsDiscoveryTaskDebugAndroidTest: task ':app:splitsDiscoveryTaskDebugAndroidTest'
               splitsDiscoveryTaskProfile: task ':app:splitsDiscoveryTaskProfile'
               splitsDiscoveryTaskRelease: task ':app:splitsDiscoveryTaskRelease'
               standardOutputCapture: org.gradle.internal.logging.services.DefaultLoggingManager@6b5f70a
               state: project state 'EXECUTED'
               status: integration
               subprojects: []
               targetCompatibility: 1.8
               tasks: task set
               test: task ':app:test'
               testDebugUnitTest: task ':app:testDebugUnitTest'
               testProfileUnitTest: task ':app:testProfileUnitTest'
               testReleaseUnitTest: task ':app:testReleaseUnitTest'
               testReportDir: C:\flutter_tests\gps_test2\build\app\reports\tests
               testReportDirName: tests
               testResultsDir: C:\flutter_tests\gps_test2\build\app\test-results
               testResultsDirName: test-results
               transformClassesWithDexBuilderForDebug: task ':app:transformClassesWithDexBuilderForDebug'
               transformClassesWithDexBuilderForDebugAndroidTest: task ':app:transformClassesWithDexBuilderForDebugAndroidTest'
               transformClassesWithDexBuilderForProfile: task ':app:transformClassesWithDexBuilderForProfile'
               transformClassesWithPreDexForRelease: task ':app:transformClassesWithPreDexForRelease'
               transformDexArchiveWithDexMergerForDebug: task ':app:transformDexArchiveWithDexMergerForDebug'
               transformDexArchiveWithDexMergerForDebugAndroidTest: task ':app:transformDexArchiveWithDexMergerForDebugAndroidTest'
               transformDexArchiveWithDexMergerForProfile: task ':app:transformDexArchiveWithDexMergerForProfile'
               transformDexArchiveWithExternalLibsDexMergerForDebug: task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'
               transformDexArchiveWithExternalLibsDexMergerForDebugAndroidTest: task ':app:transformDexArchiveWithExternalLibsDexMergerForDebugAndroidTest'
               transformDexArchiveWithExternalLibsDexMergerForProfile: task ':app:transformDexArchiveWithExternalLibsDexMergerForProfile'
               transformDexWithDexForRelease: task ':app:transformDexWithDexForRelease'
               transformNativeLibsWithMergeJniLibsForDebug: task ':app:transformNativeLibsWithMergeJniLibsForDebug'
               transformNativeLibsWithMergeJniLibsForDebugAndroidTest: task ':app:transformNativeLibsWithMergeJniLibsForDebugAndroidTest'
               transformNativeLibsWithMergeJniLibsForProfile: task ':app:transformNativeLibsWithMergeJniLibsForProfile'
               transformNativeLibsWithMergeJniLibsForRelease: task ':app:transformNativeLibsWithMergeJniLibsForRelease'
               transformResourcesWithMergeJavaResForDebug: task ':app:transformResourcesWithMergeJavaResForDebug'
               transformResourcesWithMergeJavaResForDebugAndroidTest: task ':app:transformResourcesWithMergeJavaResForDebugAndroidTest'
               transformResourcesWithMergeJavaResForDebugUnitTest: task ':app:transformResourcesWithMergeJavaResForDebugUnitTest'
               transformResourcesWithMergeJavaResForProfile: task ':app:transformResourcesWithMergeJavaResForProfile'
               transformResourcesWithMergeJavaResForProfileUnitTest: task ':app:transformResourcesWithMergeJavaResForProfileUnitTest'
               transformResourcesWithMergeJavaResForRelease: task ':app:transformResourcesWithMergeJavaResForRelease'
               transformResourcesWithMergeJavaResForReleaseUnitTest: task ':app:transformResourcesWithMergeJavaResForReleaseUnitTest'
               uninstallAll: task ':app:uninstallAll'
               uninstallDebug: task ':app:uninstallDebug'
               uninstallDebugAndroidTest: task ':app:uninstallDebugAndroidTest'
               uninstallProfile: task ':app:uninstallProfile'
               uninstallRelease: task ':app:uninstallRelease'
               validateSigningDebug: task ':app:validateSigningDebug'
               validateSigningDebugAndroidTest: task ':app:validateSigningDebugAndroidTest'
               validateSigningProfile: task ':app:validateSigningProfile'
               validateSigningRelease: task ':app:validateSigningRelease'
               version: unspecified
               writeDebugApplicationId: task ':app:writeDebugApplicationId'
               writeProfileApplicationId: task ':app:writeProfileApplicationId'
               writeReleaseApplicationId: task ':app:writeReleaseApplicationId'

               BUILD SUCCESSFUL in 2s
               1 actionable task: 1 executed

[ +10 ms] C:\Users\john2\AppData\Local\Android\sdk\build-tools\27.0.3\aapt dump badging build\app\outputs\apk\app.apk
[ +88 ms] Exit code 0 from: C:\Users\john2\AppData\Local\Android\sdk\build-tools\27.0.3\aapt dump badging build\app\outputs\apk\app.apk
[ +1 ms] package: name='com.example.gpstest2' versionCode='1' versionName='1.0' platformBuildVersionName=''
sdkVersion:'16'
targetSdkVersion:'19'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
application-label:'gps_test2'
application-label-af:'gps_test2'
application-label-am:'gps_test2'
application-label-ar:'gps_test2'
application-label-az:'gps_test2'
application-label-be:'gps_test2'
application-label-bg:'gps_test2'
application-label-bn:'gps_test2'
application-label-bs:'gps_test2'
application-label-ca:'gps_test2'
application-label-cs:'gps_test2'
application-label-da:'gps_test2'
application-label-de:'gps_test2'
application-label-el:'gps_test2'
application-label-en-AU:'gps_test2'
application-label-en-GB:'gps_test2'
application-label-en-IN:'gps_test2'
application-label-es:'gps_test2'
application-label-es-US:'gps_test2'
application-label-et:'gps_test2'
application-label-eu:'gps_test2'
application-label-fa:'gps_test2'
application-label-fi:'gps_test2'
application-label-fr:'gps_test2'
application-label-fr-CA:'gps_test2'
application-label-gl:'gps_test2'
application-label-gu:'gps_test2'
application-label-hi:'gps_test2'
application-label-hr:'gps_test2'
application-label-hu:'gps_test2'
application-label-hy:'gps_test2'
application-label-in:'gps_test2'
application-label-is:'gps_test2'
application-label-it:'gps_test2'
application-label-iw:'gps_test2'
application-label-ja:'gps_test2'
application-label-ka:'gps_test2'
application-label-kk:'gps_test2'
application-label-km:'gps_test2'
application-label-kn:'gps_test2'
application-label-ko:'gps_test2'
application-label-ky:'gps_test2'
application-label-lo:'gps_test2'
application-label-lt:'gps_test2'
application-label-lv:'gps_test2'
application-label-mk:'gps_test2'
application-label-ml:'gps_test2'
application-label-mn:'gps_test2'
application-label-mr:'gps_test2'
application-label-ms:'gps_test2'
application-label-my:'gps_test2'
application-label-nb:'gps_test2'
application-label-ne:'gps_test2'
application-label-nl:'gps_test2'
application-label-pa:'gps_test2'
application-label-pl:'gps_test2'
application-label-pt:'gps_test2'
application-label-pt-BR:'gps_test2'
application-label-pt-PT:'gps_test2'
application-label-ro:'gps_test2'
application-label-ru:'gps_test2'
application-label-si:'gps_test2'
application-label-sk:'gps_test2'
application-label-sl:'gps_test2'
application-label-sq:'gps_test2'
application-label-sr:'gps_test2'
application-label-sr-Latn:'gps_test2'
application-label-sv:'gps_test2'
application-label-sw:'gps_test2'
application-label-ta:'gps_test2'
application-label-te:'gps_test2'
application-label-th:'gps_test2'
application-label-tl:'gps_test2'
application-label-tr:'gps_test2'
application-label-uk:'gps_test2'
application-label-ur:'gps_test2'
application-label-uz:'gps_test2'
application-label-vi:'gps_test2'
application-label-zh-CN:'gps_test2'
application-label-zh-HK:'gps_test2'
application-label-zh-TW:'gps_test2'
application-label-zu:'gps_test2'
application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
application: label='gps_test2' icon='res/mipmap-mdpi-v4/ic_launcher.png'
application-debuggable
launchable-activity: name='com.example.gpstest2.MainActivity' label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
uses-feature: name='android.hardware.location.gps'
uses-implied-feature: name='android.hardware.location.gps' reason='requested android.permission.ACCESS_FINE_LOCATION permission, and targetSdkVersion < 21'
uses-feature: name='android.hardware.location.network'
uses-implied-feature: name='android.hardware.location.network' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and targetSdkVersion < 21'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '----' 'af' 'am' 'ar' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-GB' 'en-IN' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu' 'hy' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'pa' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'sk' 'sl' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '160' '240' '320' '480' '640'
native-code: 'armeabi-v7a' 'x86' 'x86_64'
[ +43 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 logcat -v time -t 1
[ +54 ms] Exit code 0 from: C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 logcat -v time -t 1
[ ] --------- beginning of main
05-29 15:26:14.950 I/PlayCommon( 1317): [719] com.google.android.play.b.h.a(580): Successfully uploaded logs.
[ +3 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 logcat -v time
[ +282 ms] DependencyChecker: C:\flutter_tests\gps_test2.packages is newer than 2018-05-29 16:24:12.000
[ +4 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb version
[ +17 ms] Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb.EXE
[ +3 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb start-server
[ +24 ms] Building APK
[ +7 ms] Running 'gradlew assembleDebug'...
[ +2 ms] [android] C:\flutter_tests\gps_test2\android\gradlew.bat -Ptarget=C:\flutter_tests\gps_test2\lib/main.dart -Ppreview-dart-2=true -Pfilesystem-scheme=org-dartlang-root assembleDebug
[ +764 ms] :app:preBuild UP-TO-DATE
[ +1 ms] :location:preBuild UP-TO-DATE
[ ] :location:preDebugBuild UP-TO-DATE
[ +7 ms] :location:checkDebugManifest
[ ] :location:processDebugManifest UP-TO-DATE
[ +274 ms] :app:preDebugBuild
[ +24 ms] :location:compileDebugAidl
[ ] :app:compileDebugAidl UP-TO-DATE
[ ] :location:packageDebugRenderscript NO-SOURCE
[ ] :app:compileDebugRenderscript UP-TO-DATE
[ +11 ms] :app:flutterBuildX86Jar UP-TO-DATE
[ +2 ms] :app:checkDebugManifest UP-TO-DATE
[ ] :app:generateDebugBuildConfig UP-TO-DATE
[ ] :app:prepareLintJar UP-TO-DATE
[ +21 ms] :app:cleanMergeDebugAssets
[ +53 ms] :app:flutterBuildDebug UP-TO-DATE
[ +10 ms] :app:mergeDebugShaders UP-TO-DATE
[ ] :app:compileDebugShaders UP-TO-DATE
[ ] :app:generateDebugAssets UP-TO-DATE
[ ] :location:mergeDebugShaders UP-TO-DATE
[ ] :location:compileDebugShaders UP-TO-DATE
[ ] :location:generateDebugAssets UP-TO-DATE
[ ] :location:mergeDebugAssets UP-TO-DATE
[ +15 ms] :app:mergeDebugAssets
[ +462 ms] :app:copyFlutterAssetsDebug
[ +1 ms] :app:generateDebugResValues UP-TO-DATE
[ ] :app:generateDebugResources UP-TO-DATE
[ ] :location:compileDebugRenderscript UP-TO-DATE
[ ] :location:generateDebugResValues UP-TO-DATE
[ ] :location:generateDebugResources UP-TO-DATE
[ +9 ms] :location:packageDebugResources UP-TO-DATE
[+4805 ms] :app:mergeDebugResources
[ +2 ms] :app:createDebugCompatibleScreenManifests UP-TO-DATE
[ +129 ms] :app:processDebugManifest
[ +1 ms] :app:splitsDiscoveryTaskDebug UP-TO-DATE
[ ] :location:platformAttrExtractor UP-TO-DATE
[ +343 ms] :location:processDebugResources
[ +378 ms] :app:processDebugResources
[ +1 ms] :app:generateDebugSources
[ +2 ms] :location:generateDebugBuildConfig UP-TO-DATE
[ ] :location:prepareLintJar UP-TO-DATE
[ ] :location:generateDebugSources
[+1142 ms] :location:javaPreCompileDebug
[+1869 ms] :location:compileDebugJavaWithJavac
[ +10 ms] :location:processDebugJavaRes NO-SOURCE
[ +52 ms] :location:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
[ +283 ms] :app:javaPreCompileDebug
[ +458 ms] :app:compileDebugJavaWithJavac
[ ] :app:compileDebugNdk NO-SOURCE
[ ] :app:compileDebugSources
[+1670 ms] :app:transformClassesWithDexBuilderForDebug
[ +454 ms] :app:transformDexArchiveWithExternalLibsDexMergerForDebug
[ +108 ms] :app:transformDexArchiveWithDexMergerForDebug
[ ] :app:mergeDebugJniLibFolders UP-TO-DATE
[ ] :location:compileDebugNdk NO-SOURCE
[ ] :location:mergeDebugJniLibFolders UP-TO-DATE
[ ] :location:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
[ ] :location:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
[+1107 ms] :app:transformNativeLibsWithMergeJniLibsForDebug
[ ] :app:processDebugJavaRes NO-SOURCE
[+2098 ms] :app:transformResourcesWithMergeJavaResForDebug
[ ] :app:validateSigningDebug
[+2591 ms] :app:packageDebug
[ ] :app:assembleDebug
[ +345 ms] :location:extractDebugAnnotations
[ +1 ms] :location:mergeDebugConsumerProguardFiles UP-TO-DATE
[ +2 ms] :location:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
[ +52 ms] :location:transformClassesAndResourcesWithSyncLibJarsForDebug
[ ] :location:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE
[ +125 ms] :location:bundleDebug
[ +2 ms] :location:compileDebugSources
[ ] :location:assembleDebug
[ ] BUILD SUCCESSFUL in 19s
[ ] 54 actionable tasks: 25 executed, 29 up-to-date
[ +574 ms] calculateSha: C:\flutter_tests\gps_test2\build\app\outputs\apk/app.apk
[ +380 ms] Built build\app\outputs\apk\debug\app-debug.apk.
[ +1 ms] C:\Users\john2\AppData\Local\Android\sdk\build-tools\27.0.3\aapt dump badging build\app\outputs\apk\app.apk
[ +13 ms] Exit code 0 from: C:\Users\john2\AppData\Local\Android\sdk\build-tools\27.0.3\aapt dump badging build\app\outputs\apk\app.apk
[ ] package: name='com.example.gpstest2' versionCode='1' versionName='1.0' platformBuildVersionName=''
sdkVersion:'16'
targetSdkVersion:'19'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
application-label:'gps_test2'
application-label-af:'gps_test2'
application-label-am:'gps_test2'
application-label-ar:'gps_test2'
application-label-az:'gps_test2'
application-label-be:'gps_test2'
application-label-bg:'gps_test2'
application-label-bn:'gps_test2'
application-label-bs:'gps_test2'
application-label-ca:'gps_test2'
application-label-cs:'gps_test2'
application-label-da:'gps_test2'
application-label-de:'gps_test2'
application-label-el:'gps_test2'
application-label-en-GB:'gps_test2'
application-label-es:'gps_test2'
application-label-es-US:'gps_test2'
application-label-et:'gps_test2'
application-label-eu:'gps_test2'
application-label-fa:'gps_test2'
application-label-fi:'gps_test2'
application-label-fr:'gps_test2'
application-label-fr-CA:'gps_test2'
application-label-gl:'gps_test2'
application-label-gu:'gps_test2'
application-label-hi:'gps_test2'
application-label-hr:'gps_test2'
application-label-hu:'gps_test2'
application-label-hy:'gps_test2'
application-label-in:'gps_test2'
application-label-is:'gps_test2'
application-label-it:'gps_test2'
application-label-iw:'gps_test2'
application-label-ja:'gps_test2'
application-label-ka:'gps_test2'
application-label-kk:'gps_test2'
application-label-km:'gps_test2'
application-label-kn:'gps_test2'
application-label-ko:'gps_test2'
application-label-ky:'gps_test2'
application-label-lo:'gps_test2'
application-label-lt:'gps_test2'
application-label-lv:'gps_test2'
application-label-mk:'gps_test2'
application-label-ml:'gps_test2'
application-label-mn:'gps_test2'
application-label-mr:'gps_test2'
application-label-ms:'gps_test2'
application-label-my:'gps_test2'
application-label-nb:'gps_test2'
application-label-ne:'gps_test2'
application-label-nl:'gps_test2'
application-label-pa:'gps_test2'
application-label-pl:'gps_test2'
application-label-pt-BR:'gps_test2'
application-label-pt-PT:'gps_test2'
application-label-ro:'gps_test2'
application-label-ru:'gps_test2'
application-label-si:'gps_test2'
application-label-sk:'gps_test2'
application-label-sl:'gps_test2'
application-label-sq:'gps_test2'
application-label-sr:'gps_test2'
application-label-sr-Latn:'gps_test2'
application-label-sv:'gps_test2'
application-label-sw:'gps_test2'
application-label-ta:'gps_test2'
application-label-te:'gps_test2'
application-label-th:'gps_test2'
application-label-tl:'gps_test2'
application-label-tr:'gps_test2'
application-label-uk:'gps_test2'
application-label-ur:'gps_test2'
application-label-uz:'gps_test2'
application-label-vi:'gps_test2'
application-label-zh-CN:'gps_test2'
application-label-zh-HK:'gps_test2'
application-label-zh-TW:'gps_test2'
application-label-zu:'gps_test2'
application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
application: label='gps_test2' icon='res/mipmap-mdpi-v4/ic_launcher.png'
application-debuggable
launchable-activity: name='com.example.gpstest2.MainActivity' label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permission.ACCESS_FINE_LOCATION permission'
uses-feature: name='android.hardware.location.gps'
uses-implied-feature: name='android.hardware.location.gps' reason='requested android.permission.ACCESS_FINE_LOCATION permission, and targetSdkVersion < 21'
uses-feature: name='android.hardware.location.network'
uses-implied-feature: name='android.hardware.location.network' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and targetSdkVersion < 21'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--
--' 'af' 'am' 'ar' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-GB' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu' 'hy' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'pa' 'pl' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'sk' 'sl' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
densities: '160' '240' '320' '480' '640'
native-code: 'armeabi-v7a' 'x86' 'x86_64'
[ +1 ms] Stopping app 'app.apk' on Android SDK built for x86.
[ ] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell am force-stop com.example.gpstest2
[ +239 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell pm list packages com.example.gpstest2
[ +253 ms] package:com.example.gpstest2
[ +2 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell cat /data/local/tmp/sky.com.example.gpstest2.sha1
[ +21 ms] bd143a9ba6a6ae1dc5b377be55fbacb16651e13e
[ +1 ms] Installing APK.
[ +1 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb version
[ +30 ms] Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb.EXE
[ ] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb start-server
[ +16 ms] Installing build\app\outputs\apk\app.apk...
[ ] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 install -r build\app\outputs\apk\app.apk
[+2721 ms] Success
[ +1 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell echo -n 108e9a8826c4f2c662ce8c8fa3c8cc33eddd221b > /data/local/tmp/sky.com.example.gpstest2.sha1
[ +28 ms] Android SDK built for x86 startApp
[ +2 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true com.example.gpstest2/com.example.gpstest2.MainActivity
[ +328 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.gpstest2/.MainActivity (has extras) }
[ ] Waiting for observatory port to be available...
[+1223 ms] I/FlutterActivityDelegate( 2512): onResume setting current activity to this
[ +199 ms] Observatory URL on device: http://127.0.0.1:34280/
[ +11 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s emulator-5554 forward tcp:8101 tcp:34280
[ +26 ms] Forwarded host port 8101 to device port 34280 for Observatory
[ +7 ms] Connecting to service protocol: http://127.0.0.1:8101/
[ +279 ms] Successfully connected to service protocol: http://127.0.0.1:8101/
[ +3 ms] getVM: {}
[ +14 ms] getIsolate: {isolateId: isolates/848563893}
[ +2 ms] _flutter.listViews: {}
[ +401 ms] DevFS: Creating new filesystem on the device (null)
[ +3 ms] _createDevFS: {fsName: gps_test2}
[ +3 ms] D/EGL_emulation( 2512): eglMakeCurrent: 0xa1e854e0: ver 3 0 (tinfo 0xa1e83360)
[ +78 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.gpstest2/cache/gps_test2HTVLUV/gps_test2/)
[ +3 ms] Updating assets
[ +433 ms] D/ ( 2512): HostConnection::get() New Host Connection established 0xa1e9da40, tid 2533
[ +1 ms] D/EGL_emulation( 2512): eglMakeCurrent: 0x9b4885a0: ver 3 0 (tinfo 0xa1e83270)
[ +4 ms] I/flutter ( 2512): GOT 2nd InitState
[ +2 ms] I/flutter ( 2512): LOCATION-1{altitude: 0.0, latitude: 51.5187983, longitude: -0.0142317, accuracy: 20.0}
[ +14 ms] I/flutter ( 2512): LOCATION CHANGED2{altitude: 0.0, latitude: 51.5187983, longitude: -0.0142317, accuracy: 20.0}
[ +16 ms] I/flutter ( 2512): LOCATION CHANGED{altitude: 0.0, latitude: 51.5187983, longitude: -0.0142317, accuracy: 20.0}
[ +268 ms] Syncing files to device Android SDK built for x86...
[ +4 ms] DevFS: Starting sync from LocalDirectory: 'C:\flutter_tests\gps_test2'
[ ] Scanning project files
[ +3 ms] Scanning package files
[ +110 ms] Scanning asset files
[ +6 ms] Scanning for deleted files
[ +60 ms] Compiling dart to kernel with 415 updated files
[ +15 ms] c:\flutter_dev\flutter\bin\cache\dart-sdk\bin\dart c:\flutter_dev\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root c:\flutter_dev\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --strong --target=flutter --output-dill build\app.dill --packages C:\flutter_tests\gps_test2.packages --filesystem-scheme org-dartlang-root
[+4036 ms] Updating files
[ +585 ms] DevFS: Sync finished
[ +41 ms] Synced 0.8MB.
[ +4 ms] _flutter.listViews: {}
[ +10 ms] Connected to _flutterView/0xa71b530c.
[ +1 ms] ?? To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
[ ] An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:8101/
[ ] For a more detailed help message, press "h". To quit, press "q".
[+54225 ms] I/flutter ( 2512): LOCATION CHANGED{altitude: 0.0, latitude: 51.5187983, longitude: -0.0142317, accuracy: 20.0}
[+10027 ms] I/flutter ( 2512): LOCATION CHANGED{altitude: 0.0, latitude: 51.5187983, longitude: -0.0142317, accuracy: 23.429000854492188}
[+9988 ms] I/flutter ( 2512): LOCATION CHANGED{altitude: 0.0, latitude: 51.5187983, longitude: -0.0142317, accuracy: 23.429000854492188}
[+3774 ms] ext.flutter.exit: {isolateId: isolates/848563893}
[ +96 ms] Service protocol connection closed.
[ +1 ms] Lost connection to device.
[ +13 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.example.gpstest2/cache/gps_test2HTVLUV/gps_test2/)
[ +1 ms] _deleteDevFS: {fsName: gps_test2}
Terminate batch job (Y/N)?

Requesting animated gif on README

Thank you so much for the plugin!

To help with advertising the plugin, we'd like to ask you to add an animated gif to your README. That will show up when rendered on GitHub and on pub.dartlang.org

Then, we can tweet it out :)

Need to control when permission prompt shows

At the moment, on iOS (haven't tested on Android), the permission dialog appears immediately on app load despite not calling any Location() funcs..

This is an absolute must - being able to control when the permission prompt shows

Execution failed for task ':app:packageDebug'. > !zip.isFile()

I am using the windows emulator and I get the above exception when I add the location: "^1.1.6" to my pubspec.yaml
file details:
name: testflutter
description: A new flutter project.

dependencies:
dartson: "^0.2.7"
cipher: "^0.7.1"
location: "^1.1.6"
flutter:
sdk: flutter
flutter:
uses-material-design: true

Below is my verbose flutter run. I have commented out all code relating to location it seems just the dependency is causing issues. Any ideas?

c:\testflutter>flutter run -v
[ +26 ms] [c:\flutter] git rev-parse --abbrev-ref --symbolic @{u}
[ +38 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ +1 ms] origin/alpha
[ +1 ms] [c:\flutter] git ls-remote --get-url origin
[ +16 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +2 ms] [c:\flutter] git log -n 1 --pretty=format:%H
[ +23 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] 973304d5fbf737510ecc250b93d9ee2e872b563f
[ +2 ms] [c:\flutter] git log -n 1 --pretty=format:%ar
[ +15 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 5 months ago
[+5335 ms] Failed to check Flutter version in the remote repository: VersionCheckError: Command exited with code 128: git log flutter_version_check/alpha -n 1 --pretty=format:%ad --date=iso
Standard error: fatal: ambiguous argument 'flutter_version_check/alpha': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

[ +259 ms] Listing devices using C:\Android\android-sdk\platform-tools\adb
[ +1 ms] C:\Android\android-sdk\platform-tools\adb devices -l
[ +43 ms] Exit code 0 from: C:\Android\android-sdk\platform-tools\adb devices -l
[ ] List of devices attached
emulator-5554 device product:sdk_google_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86
[ +19 ms] C:\Android\android-sdk\platform-tools\adb -s emulator-5554 shell getprop
[ +564 ms] Launching lib/main.dart on Android SDK built for x86 in debug mode...
[ +209 ms] Using gradle from C:\Program Files\Android\Android Studio1\gradle\gradle-3.2\bin\gradle.bat.
[ +3 ms] [android] C:\Program Files\Android\Android Studio1\gradle\gradle-3.2\bin\gradle.bat app:properties
[+1672 ms] Exit code 0 from: C:\Program Files\Android\Android Studio1\gradle\gradle-3.2\bin\gradle.bat app:properties
[ +3 ms] C:\Android\android-sdk\build-tools\26.0.2\aapt dump badging C:\RND\testflutter\build\app/outputs/apk/app.apk
[ +12 ms] Exit code 0 from: C:\Android\android-sdk\build-tools\26.0.2\aapt dump badging C:\RND\testflutter\build\app/outputs/apk/app.apk
[ ] package: name='com.yourcompany.testflutter' versionCode='1' versionName='0.0.1' platformBuildVersionName='7.1.1'
sdkVersion:'16'
targetSdkVersion:'21'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
application-label:'testflutter'
application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
application: label='testflutter' icon='res/mipmap-mdpi-v4/ic_launcher.png'
application-debuggable
launchable-activity: name='com.yourcompany.testflutter.MainActivity' label='' icon=''
feature-group: label=''
uses-feature: name='android.hardware.faketouch'
uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
uses-feature: name='android.hardware.location'
uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_FINE_LOCATION permission'
main
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '160' '240' '320' '480' '640'
native-code: 'armeabi-v7a' 'x86' 'x86_64'
[ +22 ms] C:\Android\android-sdk\platform-tools\adb -s emulator-5554 logcat -v time -t 1
[ +51 ms] Exit code 0 from: C:\Android\android-sdk\platform-tools\adb -s emulator-5554 logcat -v time -t 1
[ ] --------- beginning of main
10-25 06:03:25.336 I/DeviceStateChecker( 2519): DeviceStateChecker cancelled
[ +5 ms] C:\Android\android-sdk\platform-tools\adb -s emulator-5554 logcat -v time
[ +251 ms] DependencyChecker: c:\RND\testflutter.packages is newer than 2017-10-25 17:02:11.000
[ +6 ms] C:\Android\android-sdk\platform-tools\adb version
[ +19 ms] Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
Installed as C:\Android\android-sdk\platform-tools\adb.EXE
[ +6 ms] C:\Android\android-sdk\platform-tools\adb start-server
[ +166 ms] Building APK
[ +71 ms] Found plugin location at C:\Users\bensuryn\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\location-1.1.6
[ +37 ms] Using gradle from C:\Program Files\Android\Android Studio1\gradle\gradle-3.2\bin\gradle.bat.
[ +3 ms] Running 'gradle assembleDebug'...
[ +3 ms] [android] C:\Program Files\Android\Android Studio1\gradle\gradle-3.2\bin\gradle.bat -Ptarget=c:\RND\testflutter\lib/main.dart assembleDebug
[+1560 ms] Incremental java compilation is an incubating feature.
[ +7 ms] The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
[ +2 ms] at build_9dkbe9x2d3p3h3i98e013hzot$_run_closure2.doCall(C:\RND\testflutter\android\build.gradle:20)
[ +74 ms] WARNING: Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (25.2.0) and test app (25.0.0) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
[ +44 ms] :app:flutterBuildX86Jar UP-TO-DATE
[ +1 ms] :app:preBuild UP-TO-DATE
[ +2 ms] :app:preDebugBuild UP-TO-DATE
[ +2 ms] :app:checkDebugManifest
[ +2 ms] :app:preProfileBuild UP-TO-DATE
[ +2 ms] :app:preReleaseBuild UP-TO-DATE
[ +1 ms] :location:preBuild UP-TO-DATE
[ +1 ms] :location:preReleaseBuild UP-TO-DATE
[ +2 ms] :location:checkReleaseManifest
[ +2 ms] :location:preDebugAndroidTestBuild UP-TO-DATE
[ +1 ms] :location:preDebugBuild UP-TO-DATE
[ +1 ms] :location:preDebugUnitTestBuild UP-TO-DATE
[ +1 ms] :location:preReleaseUnitTestBuild UP-TO-DATE
[ +1 ms] :location:prepareComAndroidSupportSupportCompat2520Library UP-TO-DATE
[ +1 ms] :location:prepareComAndroidSupportSupportCoreUi2520Library UP-TO-DATE
[ +1 ms] :location:prepareComAndroidSupportSupportCoreUtils2520Library UP-TO-DATE
[ +1 ms] :location:prepareComAndroidSupportSupportFragment2520Library UP-TO-DATE
[ +1 ms] :location:prepareComAndroidSupportSupportMediaCompat2520Library UP-TO-DATE
[ +1 ms] :location:prepareComAndroidSupportSupportV42520Library UP-TO-DATE
[ +3 ms] :location:prepareComGoogleAndroidGmsPlayServicesBase1142Library UP-TO-DATE
[ +2 ms] :location:prepareComGoogleAndroidGmsPlayServicesBaseLicense1142Library UP-TO-DATE
[ +13 ms] :location:prepareComGoogleAndroidGmsPlayServicesBasement1142Library UP-TO-DATE
[ +2 ms] :location:prepareComGoogleAndroidGmsPlayServicesBasementLicense1142Library UP-TO-DATE
[ +1 ms] :location:prepareComGoogleAndroidGmsPlayServicesLocation1142Library UP-TO-DATE
[ +2 ms] :location:prepareComGoogleAndroidGmsPlayServicesLocationLicense1142Library UP-TO-DATE
[ +2 ms] :location:prepareComGoogleAndroidGmsPlayServicesTasks1142Library UP-TO-DATE
[ +3 ms] :location:prepareComGoogleAndroidGmsPlayServicesTasksLicense1142Library UP-TO-DATE
[ +1 ms] :location:prepareReleaseDependencies
[ +8 ms] :location:compileReleaseAidl UP-TO-DATE
[ +2 ms] :location:compileReleaseNdk UP-TO-DATE
[ +1 ms] :location:compileLint UP-TO-DATE
[ +2 ms] :location:copyReleaseLint UP-TO-DATE
[ +6 ms] :location:compileReleaseRenderscript UP-TO-DATE
[ +3 ms] :location:generateReleaseBuildConfig UP-TO-DATE
[ +2 ms] :location:generateReleaseResValues UP-TO-DATE
[ +1 ms] :location:generateReleaseResources UP-TO-DATE
[ +47 ms] :location:mergeReleaseResources UP-TO-DATE
[ +3 ms] :location:processReleaseManifest UP-TO-DATE
[ +20 ms] :location:processReleaseResources UP-TO-DATE
[ +1 ms] :location:generateReleaseSources UP-TO-DATE
[ +3 ms] :location:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
[ +14 ms] :location:compileReleaseJavaWithJavac UP-TO-DATE
[ +6 ms] :location:extractReleaseAnnotations UP-TO-DATE
[ +2 ms] :location:mergeReleaseShaders UP-TO-DATE
[ +2 ms] :location:compileReleaseShaders UP-TO-DATE
[ +1 ms] :location:generateReleaseAssets UP-TO-DATE
[ +2 ms] :location:mergeReleaseAssets UP-TO-DATE
[ +2 ms] :location:mergeReleaseProguardFiles UP-TO-DATE
[ +1 ms] :location:packageReleaseRenderscript UP-TO-DATE
[ +2 ms] :location:packageReleaseResources UP-TO-DATE
[ +1 ms] :location:processReleaseJavaRes UP-TO-DATE
[ +2 ms] :location:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
[ +3 ms] :location:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
[ +2 ms] :location:mergeReleaseJniLibFolders UP-TO-DATE
[ +2 ms] :location:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
[ +1 ms] :location:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
[ +3 ms] :location:bundleRelease UP-TO-DATE
[ +2 ms] :app:prepareComAndroidSupportSupportCompat2520Library UP-TO-DATE
[ +2 ms] :app:prepareComAndroidSupportSupportCoreUi2520Library UP-TO-DATE
[ +2 ms] :app:prepareComAndroidSupportSupportCoreUtils2520Library UP-TO-DATE
[ +2 ms] :app:prepareComAndroidSupportSupportFragment2520Library UP-TO-DATE
[ +3 ms] :app:prepareComAndroidSupportSupportMediaCompat2520Library UP-TO-DATE
[ +2 ms] :app:prepareComAndroidSupportSupportV42520Library UP-TO-DATE
[ +11 ms] :app:prepareComGoogleAndroidGmsPlayServicesBase1104Library UP-TO-DATE
[ +10 ms] :app:prepareComGoogleAndroidGmsPlayServicesBasement1104Library UP-TO-DATE
[ +2 ms] :app:prepareComGoogleAndroidGmsPlayServicesLocation1104Library UP-TO-DATE
[ +2 ms] :app:prepareComGoogleAndroidGmsPlayServicesTasks1104Library UP-TO-DATE
[ +2 ms] :app:prepareComLyokoneLocationLocation10SNAPSHOTLibrary UP-TO-DATE
[ +1 ms] :app:prepareDebugDependencies
[ +6 ms] :app:compileDebugAidl UP-TO-DATE
[ +3 ms] :app:compileDebugRenderscript UP-TO-DATE
[ +1 ms] :app:generateDebugBuildConfig UP-TO-DATE
[ +1 ms] :app:flutterDependenciesDebug UP-TO-DATE
[ +199 ms] :app:flutterBuildDebug UP-TO-DATE
[ +3 ms] :app:mergeDebugShaders UP-TO-DATE
[ +1 ms] :app:compileDebugShaders UP-TO-DATE
[ +1 ms] :app:generateDebugAssets UP-TO-DATE
[ +5 ms] :app:mergeDebugAssets UP-TO-DATE
[ +1 ms] :app:copyFlutterAssetsDebug UP-TO-DATE
[ +1 ms] :app:generateDebugResValues UP-TO-DATE
[ +1 ms] :app:generateDebugResources UP-TO-DATE
[ +34 ms] :app:mergeDebugResources UP-TO-DATE
[ +6 ms] :app:processDebugManifest UP-TO-DATE
[ +11 ms] :app:processDebugResources UP-TO-DATE
[ +1 ms] :app:generateDebugSources UP-TO-DATE
[ +4 ms] :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
[ +11 ms] :app:compileDebugJavaWithJavac UP-TO-DATE
[ +1 ms] :app:compileDebugNdk UP-TO-DATE
[ +1 ms] :app:compileDebugSources UP-TO-DATE
[ +5 ms] :app:transformClassesWithDexForDebug UP-TO-DATE
[ +2 ms] :app:mergeDebugJniLibFolders UP-TO-DATE
[ +4 ms] :app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
[ +1 ms] :app:processDebugJavaRes UP-TO-DATE
[ +3 ms] :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
[ +1 ms] :app:validateSigningDebug
[ +17 ms] :app:packageDebug FAILED
[ +3 ms] FAILURE: Build failed with an exception.
[ +3 ms] * What went wrong:
[ +1 ms] Execution failed for task ':app:packageDebug'.
[ +2 ms] > !zip.isFile()
[ +2 ms] * Try:
[ +1 ms] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ +2 ms] BUILD FAILED
[ +1 ms] Total time: 2.229 secs
[ +370 ms] "flutter run" took 6,094ms.
Gradle build failed: 1

#0 throwToolExit (package:flutter_tools/src/base/common.dart:29)
#1 buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:244)

#2 buildGradleProject (package:flutter_tools/src/android/gradle.dart:192)

#3 buildApk (package:flutter_tools/src/commands/build_apk.dart:83)

#4 AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:334)

#5 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:223)

#6 HotRunner.run (package:flutter_tools/src/run_hot.dart:183)

#7 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:321)

#8 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:210)

#9 RunCommand.verifyThenRunCommand (package:flutter_tools/src/commands/run.dart:210)

#10 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:156)

#11 CommandRunner.runCommand (package:args/command_runner.dart:194)

#12 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:261)

#13 CommandRunner.run. (package:args/command_runner.dart:109)
#14 Future.Future.sync (dart:async/future.dart:208)
#15 CommandRunner.run (package:args/command_runner.dart:109)
#16 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:156)
#17 run. (package:flutter_tools/executable.dart:140)

#18 AppContext._run (package:flutter_tools/src/base/context.dart:76)

#19 AppContext.runInZone. (package:flutter_tools/src/base/context.dart:66)
#20 _rootRun (dart:async/zone.dart:1120)
#21 _CustomZone.run (dart:async/zone.dart:1001)
#22 runZoned (dart:async/zone.dart:1465)
#23 AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#24 run (package:flutter_tools/executable.dart:113)

#25 main (package:flutter_tools/executable.dart:66)

#26 main (file:///c:/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#27 _startIsolate. (dart:isolate-patch/isolate_patch.dart:263)
#28 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

[ +299 ms] ensureAnalyticsSent: 252ms
[ +4 ms] exiting with code 1

Support for mock locations

Does this plugin have any function to detect when user tries to mock location, say return true/false?

Get oneshot updated location :)

Can you implement a way to get oneshot updated location, currently getLocation retrieves the last known location not an updated :/ and i don't want to use a listener.
thx :)

Error at application start

I recently updated firebase plugins (cloud_firestore to 0.7.1 and firebase_auth to 0.5.10) but when i did that the app started to crash on the start with no messages in the Run tab but in the logcat i got this message:

--------- beginning of crash

05-22 10:26:00.074 28690-28690/com.pitahaya.milagritoapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.pitahaya.milagritoapp, PID: 28690
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
at com.google.android.gms.location.LocationServices.(Unknown Source:0)
at com.google.android.gms.location.LocationServices.getFusedLocationProviderClient(Unknown Source:0)
at com.lyokone.location.LocationPlugin.(LocationPlugin.java:75)
at com.lyokone.location.LocationPlugin.registerWith(LocationPlugin.java:204)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:35)
at com.pitahaya.milagritoapp.MainActivity.onCreate(MainActivity.java:12)
at android.app.Activity.performCreate(Activity.java:7009)
at android.app.Activity.performCreate(Activity.java:7000)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.api.Api$zzf" on path: DexPathList[[zip file "/data/app/com.pitahaya.milagritoapp-u14Dl6eec5L4GmHlIXGlqg==/base.apk"],nativeLibraryDirectories=[/data/app/com.pitahaya.milagritoapp-u14Dl6eec5L4GmHlIXGlqg==/lib/x86, /data/app/com.pitahaya.milagritoapp-u14Dl6eec5L4GmHlIXGlqg==/base.apk!/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.location.LocationServices.(Unknown Source:0) 
at com.google.android.gms.location.LocationServices.getFusedLocationProviderClient(Unknown Source:0) 
at com.lyokone.location.LocationPlugin.(LocationPlugin.java:75) 
at com.lyokone.location.LocationPlugin.registerWith(LocationPlugin.java:204) 
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:35) 
at com.pitahaya.milagritoapp.MainActivity.onCreate(MainActivity.java:12) 
at android.app.Activity.performCreate(Activity.java:7009) 
at android.app.Activity.performCreate(Activity.java:7000) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
at android.app.ActivityThread.-wrap11(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6494) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 

Add method hasLocationPermission

As mentioned in flutter/flutter#685, the best practice for plugins requesting permissions is to expose a method hasPermissionX, so that people can check if the user declined the permission. I suppose it would be best to provide a method Future<bool> hasFineLocationPermission() that would trigger the permission request (if it has not been requested yet) and return true/false after the user selects.

Can't pass currentLocation to my initial cameraPosition in "map_view"

What I need:

  • Set the current location to the initial camerPosition in map_view
  • Set a draggable marker starts in the current location

What problem I faced:

  • My currentLocation always waiting and returns null
    currentLocation = await userLocation.getLocation;

My async method

Future _pickPlace() async {
    var getPresentLocation;
    try {
      getPresentLocation = await userLocation.getLocation;
      error = null;
    } on PlatformException catch (e) {
      if (e.code == 'PERMISSION_DENIED') {
        error = 'Permission denied';
      } else if (e.code == 'PERMISSION_DENIED_NEVER_ASK') {
        error = 'Permission denied - please ask the user to enable it from the app settings';
      }
      getPresentLocation = null;
    }
    print('current location = ${getPresentLocation}');
  

map_view .show() method

mapView.show(
      MapOptions(
        showUserLocation: true,
        title: "Choose a place",
        initialCameraPosition: CameraPosition(
            locMapView.Location(getPresentLocation["latitude"],
                getPresentLocation['longitude']),
            15.0),
      ),
      toolbarActions: <ToolbarAction>[
        ToolbarAction("Close", 1),
      ]);

  mapView.onToolbarAction.listen((id) {
    if (id == 1) {
      print('1');
      mapView.dismiss();
    }
  });

  mapView.addMarker(new Marker(
    "1",
    "Pick up place!",
    getPresentLocation["latitude"],
    getPresentLocation['longitude'],
    draggable: true,
  ));

Any ideas ?

Finished with error: Exit code 1 from:

Hello

anyone know why this class is missing or cant be loadet in the project ?

Finished with error: Exit code 1 from: /Users/memyself/Desktop/flutterlocation/example/android/gradlew -v: Error: Mainclass org.gradle.wrapper.GradleWrapperMain could not be found or loadet.

Error calling the plugin

I followed the instructions, but It says:

I/flutter (27758): The following MissingPluginException was thrown while activating platform stream on channel
I/flutter (27758): lyokone/locationstream:
I/flutter (27758): MissingPluginException(No implementation found for method listen on channel lyokone/locationstream)

iOS does not build

This is the error it gives:

GeneratedPluginRegistrant.m:6:9: fatal error: 'location/LocationPlugin.h' file not found #import <location/LocationPlugin.h>

Xcode 9 does not support building or migrating Swift 2.x targets

After High Sierra upgrade, I'm seeing this with a project (which built successfully before the upgrade). This is when opening the Runner.xcworspace file in XCode.

The target “location” contains source code developed with Swift 2.x. Xcode 9 does not support building or migrating Swift 2.x targets.

Use Xcode 8.x to migrate the code to Swift 3.

Any chance we could get a quick upgrade to Swift 3?

Failed to get location

From the example:

var currentLocationN = <String, double>{};

    var location = new Location();

    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      currentLocationN = await location.getLocation;

      setState(() {
        _currentLocation = currentLocationN;
      });
    } catch (ex) {
      _error = ex.toString();
    }

Fails to get location with PlatformException. I also got a warning:

Configuration 'compile' in project ':location' is deprecated. Use 'implementation' instead.

EDIT: It doesn’t even work on iOS. Another dead plugin 😔

1.2.0 NoClassDefFoundError on build

This is from the logs.

04-24 12:16:11.129 5071-5071/com.myapp.app E/AndroidRuntime: FATAL EXCEPTION: main Process: com.myapp.app, PID: 5071 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf; at com.google.android.gms.location.LocationServices.<clinit>(Unknown Source) at com.lyokone.location.LocationPlugin.<init>(LocationPlugin.java:75) at com.lyokone.location.LocationPlugin.registerWith(LocationPlugin.java:204) at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:30) at com.myapp.app.MainActivity.onCreate(MainActivity.kt:11) at android.app.Activity.performCreate(Activity.java:5937) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360) at android.app.ActivityThread.access$800(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.api.Api$zzf" on path: DexPathList[[zip file "/data/app/com.myapp.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp.app-1/lib/x86_64, /vendor/lib64, /system/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at com.google.android.gms.location.LocationServices.<clinit>(Unknown Source)  at com.lyokone.location.LocationPlugin.<init>(LocationPlugin.java:75)  at com.lyokone.location.LocationPlugin.registerWith(LocationPlugin.java:204)  at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:30)  at com.myapp.app.MainActivity.onCreate(MainActivity.kt:11)  at android.app.Activity.performCreate(Activity.java:5937)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)  at android.app.ActivityThread.access$800(ActivityThread.java:144)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5221)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)  Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.common.api.Api$zzf at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 19 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

I dont understand why i got this error

1.3.3 Works with API26/27 but fatal exception with API21/25 getSpeedAccuracyMetersPerSecond

The log is below for the exception.

It looks like this function was added in 1.3.1. But not sure how significant that is

[        ] D/AndroidRuntime( 3274): Shutting down VM
[        ] E/AndroidRuntime( 3274): FATAL EXCEPTION: main
[        ] E/AndroidRuntime( 3274): Process: com.example.gpstest3, PID: 3274
[        ] E/AndroidRuntime( 3274): java.lang.NoSuchMethodError: No virtual method getSpeedAccuracyMetersPerSecond()F in class Landroid/location/Location; or its super classes (declaration of 'android.location.Location' appears in /system/framework/framework.jar)
[        ] E/AndroidRuntime( 3274):     at com.lyokone.location.LocationPlugin$2.onLocationResult(LocationPlugin.java:139)
[        ] E/AndroidRuntime( 3274):     at com.google.android.gms.internal.location.zzau.notifyListener(Unknown Source)
[        ] E/AndroidRuntime( 3274):     at com.google.android.gms.common.api.internal.ListenerHolder.notifyListenerInternal(Unknown Source)
[        ] E/AndroidRuntime( 3274):     at com.google.android.gms.common.api.internal.ListenerHolder$zza.handleMessage(Unknown Source)
[        ] E/AndroidRuntime( 3274):     at android.os.Handler.dispatchMessage(Handler.java:102)
[        ] E/AndroidRuntime( 3274):     at android.os.Looper.loop(Looper.java:135)
[        ] E/AndroidRuntime( 3274):     at android.app.ActivityThread.main(ActivityThread.java:5221)
[        ] E/AndroidRuntime( 3274):     at java.lang.reflect.Method.invoke(Native Method)
[        ] E/AndroidRuntime( 3274):     at java.lang.reflect.Method.invoke(Method.java:372)
[        ] E/AndroidRuntime( 3274):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
[        ] E/AndroidRuntime( 3274):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
[        ] D/        ( 3274): HostConnection::get() New Host Connection established 0xac6f6100, tid 3390
[        ] D/EGL_emulation( 3274): eglMakeCurrent: 0xaf915040: ver 3 1
[  +22 ms] I/Process ( 3274): Sending signal. PID: 3274 SIG: 9
[  +86 ms] TimeoutException after 0:00:00.250000: Future not completed
[   +9 ms] "flutter run" took 105,130ms.

How to solve the error ’location/LocationPlugin.h' file not found ?

I am new to the mobile app development using Flutter.This app mainly used for fetching location.
In my iOS simulator its working properly but cannot run the app in my iOS device.I always got the error like ’location/LocationPlugin.h' file not found .This error happens when I tried to build app using Xcode10.0 beta. How to solve this issue?

Error when building app for Android

When I try to run the app, I get the following messages:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.google.android.gms:play-services-base' has different version for the compile (11.8.0) and runtime (15.0.1) classpath. You should manually set the same version via DependencyResolution

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Finished with error: Gradle build failed: 1

I saw here that, in order to fix this, all you have to do is change the GMS dependency from "implementation" to "api" in the library's build.gradle file.

I did it and it worked. I am just posting this issue to let you guys know so that someone can fix it. Thanks.

App crashing when onLocationChanged is used

Below is the code I took from the docs. It seems not working and throws a RuntimeException.

var location = new Location();

try {
  location.onLocationChanged.listen((location) {
    print(location);
  });
E/AndroidRuntime(26645): FATAL EXCEPTION: main
E/AndroidRuntime(26645): Process: br.co.carbucks.carbucks, PID: 26645
E/AndroidRuntime(26645): java.lang.RuntimeException: Location permission denied
E/AndroidRuntime(26645): 	at com.lyokone.location.LocationPlugin$2.onLocationResult(LocationPlugin.java:141)
E/AndroidRuntime(26645): 	at com.google.android.gms.internal.location.zzau.notifyListener(Unknown Source:4)
E/AndroidRuntime(26645): 	at com.google.android.gms.common.api.internal.ListenerHolder.notifyListenerInternal(Unknown Source:8)
E/AndroidRuntime(26645): 	at com.google.android.gms.common.api.internal.ListenerHolder$zza.handleMessage(Unknown Source:14)
E/AndroidRuntime(26645): 	at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(26645): 	at android.os.Looper.loop(Looper.java:164)
E/AndroidRuntime(26645): 	at android.app.ActivityThread.main(ActivityThread.java:6494)
E/AndroidRuntime(26645): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(26645): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/AndroidRuntime(26645): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

So I digged a little deeper and found the part throwing this exception. These are the code from L127-L145 of LocationPlugin.java. Why should the condition be events == null and then a method success() of the events object being access later in the true block?

private void createLocationCallback() {
    mLocationCallback = new LocationCallback() {
        @Override
        public void onLocationResult(LocationResult locationResult) {
            if(events == null) {
                super.onLocationResult(locationResult);
                Location location = locationResult.getLastLocation();
                HashMap<String, Double> loc = new HashMap<String, Double>();
                loc.put("latitude", location.getLatitude());
                loc.put("longitude", location.getLongitude());
                loc.put("accuracy", (double) location.getAccuracy());
                loc.put("altitude", location.getAltitude());
                events.success(loc);
            } else {
                throw new RuntimeException("Location permission denied");
            }
        }
    };
}

Support Dart2

Current code is not working with Dart2.

What I found as first is part with code

).then((String result) {

start working when replaced with

).then((dynamic result) {

But I don't have solution to fix problem with casting in "_setMethodCallHandlerListener"

type '_InternalLinkedHashMap' is not a subtype of type 'Map<String, List<double>>' where
  _InternalLinkedHashMap is from dart:collection
  Map is from dart:core
  String is from dart:core
  List is from dart:core
  double is from dart:core

iOS different behaviour then Android

Hey, thanks for a great plugin!

I used Location only with callback like this:
_location.onLocationChanged.listen(_handleLocationChanged);

This solution works on android (calls system requirements for permissions to Location services), but doesn't work on iOS (doesn't pop the dialog with requirements for permissions).

I needed to add line: _location.getLocation; to trigger the logic which calls system dialogs for permissions in iOS. I think this is inconsistent behaviour and should be corrected, but apart from that great work!

Regards

Type 'Future<dynamic>' is not a subtype of type 'Future<Map<String, double>>'

Hi! I have the kind of error, when I try to get location:

type 'Future<dynamic>' is not a subtype of type 'Future<Map<String, double>>' where Future is from dart:async Future is from dart:async Map is from dart:core String is from dart:core double is from dart:core

The first string of the stack trace:
#0 Location.getLocation (package:location/location.dart:12:16)

Doesn't work with Firebase plugins because they use com.google.android.gms:play-services-location:15.+

Is there a better way to set the gms version? Many of the Google plugins now use com.google.android.gms:play-services-location:15.+ which causes the app to crash when working with this plugin.

I have had to hard code the build.gradle implementation version for now to use the same as Firebase etc , eg

Was

dependencies {
    implementation 'com.google.android.gms:play-services-location:11.+'
}

Now

dependencies {
    implementation 'com.google.android.gms:play-services-location:15.+'
}

Location permissions being prompted twice.

Hi, I'm having a problem with this plugin asking for permission multiple times when we install it. But then crashes after we respond to the second prompt. The following is the stack trace I get. This is happening in android only. it works in ios.

FATAL EXCEPTION: main
E/AndroidRuntime(23557): Process: PID: 23557
E/AndroidRuntime(23557): java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime(23557): at io.flutter.view.FlutterNativeView$1.reply(FlutterNativeView.java:148)
E/AndroidRuntime(23557): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:194)
E/AndroidRuntime(23557): at com.lyokone.location.LocationPlugin$3.onSuccess(LocationPlugin.java:235)
E/AndroidRuntime(23557): at com.lyokone.location.LocationPlugin$3.onSuccess(LocationPlugin.java:220)
E/AndroidRuntime(23557): at com.google.android.gms.tasks.zzn.run(Unknown Source)
E/AndroidRuntime(23557): at android.os.Handler.handleCallback(Handler.java:815)
E/AndroidRuntime(23557): at android.os.Handler.dispatchMessage(Handler.java:104)
E/AndroidRuntime(23557): at android.os.Looper.loop(Looper.java:207)
E/AndroidRuntime(23557): at android.app.ActivityThread.main(ActivityThread.java:5729)
E/AndroidRuntime(23557): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(23557): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
E/AndroidRuntime(23557): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749)

No exception thrown when user denied.

Hey,

when the user does not accept the location permission (iOS) then there is no way to figure this out. I would accept that

var currentLocation = <String, double>{};

var location = new Location();

// Platform messages may fail, so we use a try/catch PlatformException.
try {
  currentLocation = await location.getLocation;
} on PlatformException {
  currentLocation = null;
}

throws an exception

getLocation is very unreliable.

When location is turned on and app is open, getLocation sucessfully gets the location.

However, if i decide to turn off my location and then back on again while in the app, the getLocation never works again until i fully restart the app.

Is this an issue with the library.
Please advise.

Force Close

I'm getting a force close when I add this dependency to my project. The build is successful though. I'm getting the following output about the exit:

[  +12 ms] Exit code 0 from: C:\Users\bramv\AppData\Local\Android\Sdk\build-tools\26.0.1\aapt dump badging build\app\outputs\apk\app.apk
[        ] package: name='com.vanbilsen.bram.explr.explr' versionCode='1' versionName='1.0' platformBuildVersionName='7.1.1'
           sdkVersion:'16'
           targetSdkVersion:'25'
           uses-permission: name='android.permission.INTERNET'
           uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
           uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
           uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
           uses-permission: name='android.permission.WAKE_LOCK'
           uses-permission: name='com.google.android.c2dm.permission.RECEIVE'
           uses-permission: name='com.vanbilsen.bram.explr.explr.permission.C2D_MESSAGE'
           application-label:'explr'
           application-label-af:'explr'
           application-label-am:'explr'
           application-label-ar:'explr'
           application-label-az:'explr'
           application-label-be:'explr'
           application-label-bg:'explr'
           application-label-bn:'explr'
           application-label-bs:'explr'
           application-label-ca:'explr'
           application-label-cs:'explr'
           application-label-da:'explr'
           application-label-de:'explr'
           application-label-el:'explr'
           application-label-en-GB:'explr'
           application-label-es:'explr'
           application-label-es-US:'explr'
           application-label-et:'explr'
           application-label-eu:'explr'
           application-label-fa:'explr'
           application-label-fi:'explr'
           application-label-fr:'explr'
           application-label-fr-CA:'explr'
           application-label-gl:'explr'
           application-label-gu:'explr'
           application-label-hi:'explr'
           application-label-hr:'explr'
           application-label-hu:'explr'
           application-label-hy:'explr'
           application-label-in:'explr'
           application-label-is:'explr'
           application-label-it:'explr'
           application-label-iw:'explr'
           application-label-ja:'explr'
           application-label-ka:'explr'
           application-label-kk:'explr'
           application-label-km:'explr'
           application-label-kn:'explr'
           application-label-ko:'explr'
           application-label-ky:'explr'
           application-label-lo:'explr'
           application-label-lt:'explr'
           application-label-lv:'explr'
           application-label-mk:'explr'
           application-label-ml:'explr'
           application-label-mn:'explr'
           application-label-mr:'explr'
           application-label-ms:'explr'
           application-label-my:'explr'
           application-label-nb:'explr'
           application-label-ne:'explr'
           application-label-nl:'explr'
           application-label-pa:'explr'
           application-label-pl:'explr'
           application-label-pt-BR:'explr'
           application-label-pt-PT:'explr'
           application-label-ro:'explr'
           application-label-ru:'explr'
           application-label-si:'explr'
           application-label-sk:'explr'
           application-label-sl:'explr'
           application-label-sq:'explr'
           application-label-sr:'explr'
           application-label-sr-Latn:'explr'
           application-label-sv:'explr'
           application-label-sw:'explr'
           application-label-ta:'explr'
           application-label-te:'explr'
           application-label-th:'explr'
           application-label-tl:'explr'
           application-label-tr:'explr'
           application-label-uk:'explr'
           application-label-ur:'explr'
           application-label-uz:'explr'
           application-label-vi:'explr'
           application-label-zh-CN:'explr'
           application-label-zh-HK:'explr'
           application-label-zh-TW:'explr'
           application-label-zu:'explr'
           application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png'
           application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png'
           application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png'
           application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
           application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
           application: label='explr' icon='res/mipmap-mdpi-v4/ic_launcher.png'
           application-debuggable
           launchable-activity: name='com.vanbilsen.bram.explr.explr.MainActivity'  label='' icon=''
           feature-group: label=''
             uses-feature: name='android.hardware.faketouch'
             uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps'
             uses-feature: name='android.hardware.location'
             uses-implied-feature: name='android.hardware.location' reason='requested android.permission.ACCESS_COARSE_LOCATION permission, and requested android.permissi
on.ACCESS_FINE_LOCATION permission'
           main
           other-activities
           other-receivers
           other-services
           supports-screens: 'small' 'normal' 'large' 'xlarge'
           supports-any-density: 'true'
           locales: '--_--' 'af' 'am' 'ar' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-GB' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu
' 'hy' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'pa' 'pl' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'sk' 's
l' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu'
           densities: '160' '240' '320' '480' '640'
           native-code: 'armeabi-v7a' 'x86' 'x86_64'
[   +2 ms] Stopping app 'app.apk' on SM G955F.

[Android] First time retrieving location never returns

When trying to retrieve location with getLocation getter and permissions not yet granted, the getter never returns nor it throws an exception. It looks like the MethodChannel.Result has been "lost" somewhere on the way and result.success() or result.error() methods has never been called.

The scenario goes like this:

  1. Call getLocation (permissions not granted at this stage)
  2. User gets a prompt about permissions
  3. Accept permissions
  4. The getLocation never returns or throws exception

By the looks of the source code, the above might be connected to the part in the onRequestPermissionsResult (that's a wild guess though), where the MethodChannel.Result might be null

if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { if (result != null) { getLastLocation(result); } else if (events != null) { getLastLocation(null); <-- this here }

You could have a look at how these kind of scenarios (with asking about permissions) are handled in other flutter plugins, such as device calendar or image picker.

NOTE: I haven't tested this on iOS

use_framework! dependency makes flutter location incompatible with many plugins

Since locations is a Swift pod, it can only be run with the 'use_framework!' line in the Podfile.

"Pods written in Swift can only be integrated as frameworks; add use_frameworks! to your Podfile or target to opt into using it. The Swift Pod being used is: location"

Many other popular plugins such as Google Sign in do not work unless this line is commented out. See 9694.

[!] The 'Pods' target has transitive dependencies that include static binaries

There is a work around to the above error message but it results in misplaced headers and a failure to build. (See 10968)

This plugin would be perfect for my current project if I could get it to work with other plugins. Does anyone know of any way of getting around this? or if I'm missing something obvious?

Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution

I just used this flutter package location and the application was fine before i add the package but as soon as i installed from pubspec then immediately shows Android dependency 'com.android.support:support-v4' has different version for the compile (26.1.0) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution as error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.