Closed JohnAherne closed 6 years ago
I'm looking into it
Try to target SDK 21 or more
Thanks for the prompt reply.
Unfortunately using sdk21 and upwards does not do the trick.
Just to be clear I am running the example App with a few print statements sprinkled to see what is happening.
NEXUS 5 API 25 ANDROID 7.1 with GOOGLE PLAY SERVICES
This is running an emulator Nexus 5 api 25 android 7.1 with Google Play Services.
With TargetSDK 19, 21, 25 location1.2 works fine.
I used sdk 19 since I wanted to see how far back I could go. But by and large I want to be starting at KitKat 4.1 as the minimum at the moment.
However, with location1.3 the VM crashes with Permission denied for all of sdk19,21,25.
In the pubspec.yaml for the dependency I use: location: "1.2.0" or location: "1.3.0" just to make sure I force the correct version.
It does not always crash. Occasionally, the screen will display but the app is not running. No callbacks run. And I can't send a GPS update from the emulator screen.
Sometimes on the emulator, it looks like initPlatformState has location being set to null.
SAMSUNG DEVICE
RUN on a samsung with Android 4.1.2. It works with location 1.2 but fails with location 1.3
Here is the error log from running on the Samsung
[ +232 ms] Syncing files to device 5205668463db3102... [ +3 ms] DevFS: Starting sync from LocalDirectory: 'C:\flutter_tests\gps_test2' [ ] Scanning project files [ +2 ms] Scanning package files [ +54 ms] Scanning asset files [ +1 ms] Scanning for deleted files [ +24 ms] Compiling dart to kernel with 415 updated files [ +4 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 [+1054 ms] D/AndroidRuntime(11186): Shutting down VM [ +3 ms] W/dalvikvm(11186): threadid=1: thread exiting with uncaught exception (group=0x40efe2a0) [ +9 ms] E/AndroidRuntime(11186): FATAL EXCEPTION: main [ ] E/AndroidRuntime(11186): java.lang.RuntimeException: Location permission denied [ ] E/AndroidRuntime(11186): at com.lyokone.location.LocationPlugin$2.onLocationResult(LocationPlugin.java:141) [ ] E/AndroidRuntime(11186): at com.google.android.gms.internal.location.zzau.notifyListener(Unknown Source) [ ] E/AndroidRuntime(11186): at com.google.android.gms.common.api.internal.ListenerHolder.notifyListenerInternal(Unknown Source) [ ] E/AndroidRuntime(11186): at com.google.android.gms.common.api.internal.ListenerHolder$zza.handleMessage(Unknown Source) [ ] E/AndroidRuntime(11186): at android.os.Handler.dispatchMessage(Handler.java:99) [ ] E/AndroidRuntime(11186): at android.os.Looper.loop(Looper.java:137) [ ] E/AndroidRuntime(11186): at android.app.ActivityThread.main(ActivityThread.java:4867) [ ] E/AndroidRuntime(11186): at java.lang.reflect.Method.invokeNative(Native Method) [ ] E/AndroidRuntime(11186): at java.lang.reflect.Method.invoke(Method.java:511) [ ] E/AndroidRuntime(11186): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007) [ ] E/AndroidRuntime(11186): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) [ ] E/AndroidRuntime(11186): at dalvik.system.NativeStart.main(Native Method) [ +94 ms] I/flutter (11186): GOT 2nd InitState [ +42 ms] I/flutter (11186): LOCATION-1{accuracy: 16.760000228881836, altitude: 64.19999694824219, longitude: -0.1553803, latitude: 51.4649375} [ +36 ms] I/flutter (11186): LOCATION CHANGED2{accuracy: 16.760000228881836, altitude: 64.19999694824219, longitude: -0.1553803, latitude: 51.4649375} [ +64 ms] I/flutter (11186): LOCATION CHANGED{accuracy: 16.760000228881836, altitude: 64.19999694824219, longitude: -0.1553803, latitude: 51.4649375} [+2085 ms] Updating files [+5004 ms] DevFS: Sync finished [ +4 ms] Synced 0.8MB. [ +8 ms] _flutter.listViews: {} [ +74 ms] Connected to _flutterView/0x5a7f
HUAWEI P20 DEVICE RUNNING Android 8.1.0 LOCATION 1.3
For good measure I thought I would try with a more recent phone just to bring everything more up to date.
Here the program runs and displays on the screen with a map. But the location onchanged callback does not fire.
And when the screen goes dark, the program produces a bunch of errors - see below.
[ +16 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 [ +14 ms] Installing build\app\outputs\apk\app.apk... [ ] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s BPN0218423001699 install -r build\app\outputs\apk\app.apk [+3522 ms] Success [ +5 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s BPN0218423001699 shell echo -n 93ae53de8c46589e57b4367414f12975cc16b76d > /data/local/tmp/sky.com.example.gpstest2.sha1 [ +60 ms] EML L09 startApp [ +3 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s BPN0218423001699 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 [ +147 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.gpstest2/.MainActivity (has extras) } [ +1 ms] Waiting for observatory port to be available... [ +491 ms] I/FlutterActivityDelegate( 6406): onResume setting current activity to this [ +94 ms] Observatory URL on device: http://127.0.0.1:36030/ [ +20 ms] C:\Users\john2\AppData\Local\Android\sdk\platform-tools\adb -s BPN0218423001699 forward tcp:8101 tcp:36030 [ +29 ms] Forwarded host port 8101 to device port 36030 for Observatory [ +5 ms] Connecting to service protocol: http://127.0.0.1:8101/ [ +262 ms] Successfully connected to service protocol: http://127.0.0.1:8101/ [ +13 ms] getVM: {} [ +21 ms] getIsolate: {isolateId: isolates/251001233} [ +2 ms] _flutter.listViews: {} [ +287 ms] DevFS: Creating new filesystem on the device (null) [ ] _createDevFS: {fsName: gps_test2} [ +2 ms] W/Activity( 6406): Can reqeust only one set of permissions at a time [ +33 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.gpstest2/cache/gps_test2GLZBUB/gps_test2/) [ +3 ms] Updating assets [ +207 ms] Syncing files to device EML L09... [ +3 ms] DevFS: Starting sync from LocalDirectory: 'C:\flutter_tests\gps_test2' [ ] Scanning project files [ +2 ms] Scanning package files [ +52 ms] Scanning asset files [ +1 ms] Scanning for deleted files [ +24 ms] Compiling dart to kernel with 415 updated files [ +3 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 [+1029 ms] Updating files [ +484 ms] DevFS: Sync finished [ +1 ms] Synced 0.8MB. [ +5 ms] _flutter.listViews: {} [ +5 ms] Connected to _flutterView/0x7408726f18. [ +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 EML L09 is available at: http://127.0.0.1:8101/ [ ] For a more detailed help message, press "h". To quit, press "q". [ +493 ms] W/InputMethodManager( 6406): startInputReason = 1 [ +42 ms] I/FlutterActivityDelegate( 6406): onResume setting current activity to this [ +8 ms] I/flutter ( 6406): GOT 2nd InitState [ +4 ms] I/flutter ( 6406): LOCATION-1{altitude: 0.0, latitude: 51.4649296, accuracy: 11.114999771118164, longitude: -0.1553698} [ +1 ms] I/flutter ( 6406): LOCATION CHANGED2{altitude: 0.0, latitude: 51.4649296, accuracy: 11.114999771118164, longitude: -0.1553698} [+83301 ms] W/InputMethodManager( 6406): startInputReason = 8 [ +229 ms] V/ActivityThread( 6406): Finishing stop of ActivityRecord{f37b5c6 token=android.os.BinderProxy@23312a2 {com.example.gpstest2/com.example.gpstest2.MainActivity}} [ +26 ms] W/libEGL ( 6406): EGLNativeWindowType 0x73f7d24010 disconnect failed [+1343 ms] W/InputMethodManager( 6406): startInputReason = 7 [ +21 ms] D/mali_winsys( 6406): EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , egl_color_buffer_format , EGLBoolean) returns 0x3000 [ +2 ms] W/libEGL ( 6406): load: so=libEGL_vr.so [ ] W/libEGL ( 6406): dlopen failed: library "libEGL_vr.so" not found [ ] W/libEGL ( 6406): load: so=libEGL_vr.so [ ] W/libEGL ( 6406): dlopen failed: library "libEGL_vr.so" not found [ ] W/libEGL ( 6406): load: so=libEGL_vr.so [ ] W/libEGL ( 6406): dlopen failed: library "libEGL_vr.so" not found [ ] W/libEGL ( 6406): load: so=libEGL_vr.so [ ] W/libEGL ( 6406): dlopen failed: library "libEGL_vr.so" not found [ +14 ms] I/FlutterActivityDelegate( 6406): onResume setting current activity to this [+29958 ms] W/InputMethodManager( 6406): startInputReason = 8 [ +251 ms] V/ActivityThread( 6406): Finishing stop of ActivityRecord{f37b5c6 token=android.os.BinderProxy@23312a2 {com.example.gpstest2/com.example.gpstest2.MainActivity}} [ +18 ms] W/libEGL ( 6406): EGLNativeWindowType 0x73f3265010 disconnect failed [+4796 ms] W/libEGL ( 6406): EGLNativeWindowType 0x73f69ff010 disconnect failed [ +24 ms] V/ActivityThread( 6406): Handle window ActivityRecord{f37b5c6 token=android.os.BinderProxy@23312a2 {com.example.gpstest2/com.example.gpstest2.MainActivity}} visibility: false [+5485 ms] I/FlutterActivityDelegate( 6406): onResume setting current activity to this [ +17 ms] D/mali_winsys( 6406): EGLint new_window_surface(egl_winsys_display , void *, EGLSurface, EGLConfig, egl_winsys_surface *, egl_color_buffer_format , EGLBoolean) returns 0x3000 [ +5 ms] D/mali_winsys( 6406): EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface , egl_color_buffer_format *, EGLBoolean) returns 0x3000 [ +2 ms] W/libEGL ( 6406): load: so=libEGL_vr.so [ ] W/libEGL ( 6406): dlopen failed: library "libEGL_vr.so" not found [ +3 ms] I/chatty ( 6406): uid=10142(com.example.gpstest2) identical 2 lines [ +2 ms] W/libEGL ( 6406): load: so=libEGL_vr.so [ ] W/libEGL ( 6406): dlopen failed: library "libEGL_vr.so" not found [ ] E/BpSurfaceComposerClient( 6406): Failed to transact (-1) [ ] E/BpSurfaceComposerClient( 6406): Failed to transact (-1) [ +39 ms] W/InputMethodManager( 6406): startInputReason = 1 [+20962 ms] ext.flutter.exit: {isolateId: isolates/251001233} [ +103 ms] Application finished. Terminate batch job (Y/N)? ^C C:\flutter_tests\gps_test2>
HUAWEI P20 DEVICE RUNNING Android 8.1.0 LOCATION 1.2
Here the program runs and displays on the screen with a map. But the location onchanged callback does not fire.
[ +219 ms] Syncing files to device EML L09... [ +3 ms] DevFS: Starting sync from LocalDirectory: 'C:\flutter_tests\gps_test2' [ ] Scanning project files [ +2 ms] Scanning package files [ +51 ms] Scanning asset files [ +1 ms] Scanning for deleted files [ +24 ms] Compiling dart to kernel with 415 updated files [ +3 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 [+1305 ms] I/FlutterActivityDelegate( 7036): onResume setting current activity to this [ +3 ms] W/InputMethodManager( 7036): startInputReason = 1 [ +2 ms] I/flutter ( 7036): GOT 2nd InitState [ +2 ms] I/flutter ( 7036): LOCATION-1{altitude: 0.0, latitude: 51.4618698, accuracy: 400.0, longitude: -0.154828} [ +2 ms] I/flutter ( 7036): LOCATION CHANGED2{altitude: 0.0, latitude: 51.4618698, accuracy: 400.0, longitude: -0.154828} [+1980 ms] Updating files [ +491 ms] DevFS: Sync finished [ +1 ms] Synced 0.8MB. [ +2 ms] _flutter.listViews: {} [ +13 ms] Connected to _flutterView/0x7408726f18. [ +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 EML L09 is available at: http://127.0.0.1:8100/ [ ] For a more detailed help message, press "h". To quit, press "q". [+39476 ms] Initializing hot reload... [ +17 ms] Refreshing active FlutterViews before reloading. [ ] _flutter.listViews: {} [ +327 ms] Syncing files to device EML L09... [ ] DevFS: Starting sync from LocalDirectory: 'C:\flutter_tests\gps_test2' [ ] Scanning project files [ ] Scanning package files [ +20 ms] Scanning asset files [ ] Scanning for deleted files [ +17 ms] Compiling dart to kernel with 0 updated files [ +16 ms] Updating files [ +27 ms] DevFS: Sync finished [ ] Synced 0.0MB. [ +2 ms] _flutter.setAssetBundlePath: {viewId: _flutterView/0x7408726f18, assetDirectory: /data/user/0/com.example.gpstest2/cache/gps_test2RGGCIG/gps_test2/build/flutter_assets} [ +17 ms] _reloadSources: {pause: false, rootLibUri: /data/user/0/com.example.gpstest2/cache/gps_test2RGGCIG/gps_test2/lib/main.dart.dill, packagesUri: /data/user/0/com.example.gpstest2/cache/gps_test2RGGCIG/gps_test2/.packages, isolateId: isolates/985421718} [ +17 ms] reloaded 0 of 390 libraries [ ] Sending reload events to EML L09 [ ] Sending reload event to "main.dart$main-985421718" [ +1 ms] getIsolate: {isolateId: isolates/985421718} [ +52 ms] _flutter.listViews: {} [ +12 ms] Evicting dirty assets [ +3 ms] ext.flutter.evict: {value: AssetManifest.json, isolateId: isolates/985421718} [ +27 ms] ext.flutter.evict: {value: FontManifest.json, isolateId: isolates/985421718} [ +16 ms] ext.flutter.evict: {value: LICENSE, isolateId: isolates/985421718} [ +13 ms] Reassembling application [ +2 ms] ext.flutter.reassemble: {isolateId: isolates/985421718} [ +123 ms] ext.ui.window.scheduleFrame: {isolateId: isolates/985421718} [ +56 ms] Hot reload performed in 701ms. [ +1 ms] Reloaded 0 of 390 libraries in 774ms. [+11266 ms] I/zygote64( 7036): Do partial code cache collection, code=27KB, data=29KB [ +1 ms] I/zygote64( 7036): After code cache collection, code=27KB, data=29KB [ ] I/zygote64( 7036): Increasing code cache capacity to 128KB [+32032 ms] W/InputMethodManager( 7036): startInputReason = 8 [ +237 ms] V/ActivityThread( 7036): Finishing stop of ActivityRecord{f37b5c6 token=android.os.BinderProxy@23312a2 {com.example.gpstest2/com.example.gpstest2.MainActivity}} [ +23 ms] W/libEGL ( 7036): EGLNativeWindowType 0x73f68b3010 disconnect failed [+4801 ms] W/libEGL ( 7036): EGLNativeWindowType 0x73f68b1010 disconnect failed [ +19 ms] V/ActivityThread( 7036): Handle window ActivityRecord{f37b5c6 token=android.os.BinderProxy@23312a2 {com.example.gpstest2/com.example.gpstest2.MainActivity}} visibility: false [+5559 ms] I/FlutterActivityDelegate( 7036): onResume setting current activity to this [ +17 ms] D/mali_winsys( 7036): EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface *, egl_color_buffer_format , EGLBoolean) returns 0x3000 [ +5 ms] D/mali_winsys( 7036): EGLint new_window_surface(egl_winsys_display , void , EGLSurface, EGLConfig, egl_winsys_surface *, egl_color_buffer_format , EGLBoolean) returns 0x3000 [ +2 ms] W/libEGL ( 7036): load: so=libEGL_vr.so [ ] W/libEGL ( 7036): dlopen failed: library "libEGL_vr.so" not found [ +3 ms] I/chatty ( 7036): uid=10143(com.example.gpstest2) identical 2 lines [ ] W/libEGL ( 7036): load: so=libEGL_vr.so [ ] W/libEGL ( 7036): dlopen failed: library "libEGL_vr.so" not found [ ] E/BpSurfaceComposerClient( 7036): Failed to transact (-1) [ ] E/BpSurfaceComposerClient( 7036): Failed to transact (-1) [ +62 ms] W/InputMethodManager( 7036): startInputReason = 1 [+22352 ms] ext.flutter.exit: {isolateId: isolates/985421718} [ +105 ms] Application finished. Terminate batch job (Y/N)?
Here is the code I am using for main.dart in case it is useful.
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:location/location.dart';
void main() {
runApp(new MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => new _MyAppState();
}
class _MyAppState extends State<MyApp> {
Map<String, double> _currentLocation;
StreamSubscription<Map<String, double>> _locationSubscription;
Location _location = new Location();
String error;
bool currentWidget = true;
Image image1;
@override
void initState() {
super.initState();
initPlatformState();
_locationSubscription =
_location.onLocationChanged.listen((Map<String,double> result) {
setState(() {
_currentLocation = result;
});
print('LOCATION CHANGED' + result.toString());
});
}
// Platform messages are asynchronous, so we initialize in an async method.
initPlatformState() async {
Map<String, double> location;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
location = await _location.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';
}
location = null;
}
// If the widget was removed from the tree while the asynchronous platform
// message was in flight, we want to discard the reply rather than calling
// setState to update our non-existent appearance.
if (!mounted) return;
print('GOT 2nd InitState');
print('LOCATION-1' + location.toString());
setState(() {
_currentLocation = location;
});
print('LOCATION CHANGED2' + location.toString());
}
@override
Widget build(BuildContext context) {
List<Widget> widgets;
if (_currentLocation == null) {
widgets = new List();
} else {
widgets = [
new Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=${_currentLocation["latitude"]},${_currentLocation["longitude"]}&zoom=18&size=640x600&key=XXXXXXX")
];
}
widgets.add(new Center(
child: new Text(_currentLocation != null
? '$_currentLocation\n'
: 'Error: $error\n')));
return new MaterialApp(
home: new Scaffold(
appBar: new AppBar(
title: new Text('Plugin example app'),
),
body: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: widgets,
)));
}
}
Just noticed location 1.3 is now 1.3.2.
On the Samsung using 1.3.2 and running flutter run -v, the app crashes but flutter run is still running
Did some more testing on the emulator with location 1.3.2 and sdk 25
If I restart the emulator from scratch, I get the permissions request come up. Say Allow and the program displays a screen with null for the lat/lon. And is stuck and unresponsive.
You can see the nulls in the below log
It also warns about Can reqeust only one set of permissions at a time
Hope this is useful information
+2671 ms] DevFS: Creating new filesystem on the device (null) [ +1 ms] _createDevFS: {fsName: gps_test2} [ +73 ms] W/Activity( 6210): Can reqeust only one set of permissions at a time [ +106 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.gpstest2/cache/gps_test2OIMHNN/gps_test2/) [ +2 ms] Updating assets [ +981 ms] D/ ( 6210): HostConnection::get() New Host Connection established 0xa1ea1700, tid 6242 [ +12 ms] D/EGL_emulation( 6210): eglMakeCurrent: 0x9b499b00: ver 3 0 (tinfo 0xa1e83230) [ +583 ms] Syncing files to device Android SDK built for x86... [ +3 ms] DevFS: Starting sync from LocalDirectory: 'C:\flutter_tests\gps_test2' [ ] Scanning project files [ +3 ms] Scanning package files [ +263 ms] Scanning asset files [ +1 ms] Scanning for deleted files [ +32 ms] Compiling dart to kernel with 415 updated files [ +4 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 [+1912 ms] Updating files [+1120 ms] DevFS: Sync finished [ +230 ms] Synced 0.8MB. [ +2 ms] _flutter.listViews: {} [ +58 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:8100/ [ ] For a more detailed help message, press "h". To quit, press "q". [+5013 ms] I/FlutterActivityDelegate( 6210): onResume setting current activity to this [ +540 ms] I/flutter ( 6210): GOT 2nd InitState [ +1 ms] I/flutter ( 6210): LOCATION-1null [ +31 ms] I/flutter ( 6210): LOCATION CHANGED2null [+36422 ms] ext.flutter.exit: {isolateId: isolates/882313552} [ +88 ms] Service protocol connection closed. [ +1 ms] Lost connection to device. [ +2 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.example.gpstest2/cache/gps_test2OIMHNN/gps_test2/) [ ] _deleteDevFS: {fsName: gps_test2} Terminate batch job (Y/N)?
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]
[ +3 ms] Resolving dependencies... [ ] [android] C:\flutter_tests\gps_test2\android\gradlew.bat app:properties [+2948 ms] :app:properties
[ +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_COARSELOCATION 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_COARSELOCATION 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)