jpnurmi / flutter_libserialport Goto Github PK
View Code? Open in Web Editor NEWSerial Port for Flutter
Home Page: https://pub.dev/packages/flutter_libserialport
License: MIT License
Serial Port for Flutter
Home Page: https://pub.dev/packages/flutter_libserialport
License: MIT License
My code is as follows, pretty basic
availablePorts = libserial.SerialPort.availablePorts;
libserial.SerialPort port = libserial.SerialPort(availablePorts.first);
port.openWrite();
var config = port.config;
config.baudRate = 9600;
port.config = config;
port.config.bits = 8;
port.config.stopBits = 1;
port.config.parity = 0;
port.config = config;
final reader = libserial.SerialPortReader(port);
reader.stream.listen((Uint8List data) {
log(utf8.decode(data));
});
I get an error on receiving data -
Invalid argument(s): length must be in the range [0, 4611686018427387903].
#0 _checkExternalTypedDataLength (dart:ffi-patch/ffi_patch.dart:60:5)
#1 Uint8Pointer.asTypedList (dart:ffi-patch/ffi_patch.dart:620:5)
#2 Util.read
package:libserialport/src/util.dart:47
#3 _SerialPortReaderImpl._waitRead
package:libserialport/src/reader.dart:145
#4 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:300:17)
#5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
p.s. I have confirmed that my cables or cable configurations aren't faulty by using a native application I made and also through TeraTerm.
Edit - I am getting some data now, but its either single bytes or a byte array with all zeroes whereas the data I should be receiving is a valid byte array. I am able to get it using other terminals.
To re-produce the issue,
Please compile windows exe using the code at the bottom, which is slightly modified from the original flutter_libserialport example.
Run compilation output: example.exe.
Send some data to the comport.
Thank you very much!
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 2.3.0-17.0.pre.414, on Microsoft Windows [Version 10.0.18363.719], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
X cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run flutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.6)
[√] Android Studio (version 4.2.0)
[√] Connected device (3 available)
! Doctor found issues in 1 category.
import 'package:flutter/material.dart';
import 'package:flutter_libserialport/flutter_libserialport.dart';
void main() => runApp(ExampleApp());
class ExampleApp extends StatefulWidget {
@override
_ExampleAppState createState() => _ExampleAppState();
}
extension IntToString on int {
String toHex() => '0x${toRadixString(16)}';
String toPadded([int width = 3]) => toString().padLeft(width, '0');
String toTransport() {
switch (this) {
case SerialPortTransport.usb:
return 'USB';
case SerialPortTransport.bluetooth:
return 'Bluetooth';
case SerialPortTransport.native:
return 'Native';
default:
return 'Unknown';
}
}
}
class _ExampleAppState extends State<ExampleApp> {
var availablePorts = [];
var _portInUse = false;
late SerialPort _port;
late SerialPortReader _reader;
@override
void dispose() {
_reader.close();
_port.close();
super.dispose();
}
@override
void initState() {
super.initState();
initPorts();
}
void initPorts() {
setState(() => availablePorts = SerialPort.availablePorts);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Flutter Serial Port example'),
),
body: Scrollbar(
child: ListView(
children: [
for (final address in availablePorts)
Builder(builder: (context) {
final port = SerialPort(address);
return ExpansionTile(
title: TextButton(
child: Text(address),
onPressed: _portInUse
? null
: () {
_port = SerialPort(address);
if (!_port.openReadWrite()) {
print(SerialPort.lastError);
}
_portInUse = true;
SerialPortConfig config = SerialPortConfig();
config.baudRate = 9600;
config.stopBits = 1;
config.bits = 8;
config.setFlowControl(SerialPortFlowControl.none);
_port.config = config;
_reader = SerialPortReader(_port);
_reader.stream.listen((data) {
port.write(data);
});
setState(() {});
},
),
children: [
CardListTile('Description', port.description),
CardListTile('Transport', port.transport.toTransport()),
CardListTile('USB Bus', port.busNumber?.toPadded()),
CardListTile('USB Device', port.deviceNumber?.toPadded()),
CardListTile('Vendor ID', port.vendorId?.toHex()),
CardListTile('Product ID', port.productId?.toHex()),
CardListTile('Manufacturer', port.manufacturer),
CardListTile('Product Name', port.productName),
CardListTile('Serial Number', port.serialNumber),
CardListTile('MAC Address', port.macAddress),
],
);
}),
],
),
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.refresh),
onPressed: initPorts,
),
),
);
}
}
class CardListTile extends StatelessWidget {
final String name;
final String? value;
CardListTile(this.name, this.value);
@override
Widget build(BuildContext context) {
return Card(
child: ListTile(
title: Text(value ?? 'N/A'),
subtitle: Text(name),
),
);
}
}
Hi I cloned the repo, jumped in /examples and executed a "flutter run" command...
The app launched, I then connected an ESP32 to USB port on my phone and tapped on the refresh button.
This happened :
W/1.ui ( 5446): type=1400 audit(0.0:22048): avc: denied { read } for name="tty" dev="sysfs" ino=18303 scontext=u:r:untrusted_app:s0:c98,c257,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0 I/flutter ( 5446): ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════ I/flutter ( 5446): The following SerialPortError was thrown while handling a gesture: I/flutter ( 5446): Permission denied, errno = 13 I/flutter ( 5446): I/flutter ( 5446): When the exception was thrown, this was the stack: I/flutter ( 5446): #0 Util.call (package:dart_serial_port/src/util.dart:39:7) I/flutter ( 5446): #1 _SerialPortImpl.availablePorts (package:dart_serial_port/src/port.dart:230:21) I/flutter ( 5446): #2 SerialPort.availablePorts (package:dart_serial_port/src/port.dart:82:61) I/flutter ( 5446): #3 _ExampleAppState.initPorts.<anonymous closure> (package:flutter_serial_port_example/main.dart:38:48) I/flutter ( 5446): #4 State.setState (package:flutter/src/widgets/framework.dart:1268:30) I/flutter ( 5446): #5 _ExampleAppState.initPorts (package:flutter_serial_port_example/main.dart:38:5)I/flutter ( 5446): #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:990:20) I/flutter ( 5446): #7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:183:24) I/flutter ( 5446): #8 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:598:11)I/flutter ( 5446): #9 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:287:5)I/flutter ( 5446): #10 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:222:7) I/flutter ( 5446): #11 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:476:9) I/flutter ( 5446): #12 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:93:12) I/flutter ( 5446): #13 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:138:9) I/flutter ( 5446): #14 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:387:8) I/flutter ( 5446): #15 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:136:18) I/flutter ( 5446): #16 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:122:7) I/flutter ( 5446): #17 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:381:19) I/flutter ( 5446): #18 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:361:22)I/flutter ( 5446): #19 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:280:11) I/flutter ( 5446): #20 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:316:7) I/flutter ( 5446): #21 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:280:5) I/flutter ( 5446): #22 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:238:7) I/flutter ( 5446): #23 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:221:7) I/flutter ( 5446): #27 _invoke1 (dart:ui/hooks.dart:176:10) I/flutter ( 5446): #28 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:276:7) I/flutter ( 5446): #29 _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31) I/flutter ( 5446): (elided 3 frames from dart:async) I/flutter ( 5446): I/flutter ( 5446): Handler: "onTap" I/flutter ( 5446): Recognizer: I/flutter ( 5446): TapGestureRecognizer#77b4e I/flutter ( 5446): ════════════════════════════════════════════════════════════════════════════════════════════════════ W/1.ui ( 5446): type=1400 audit(0.0:22050): avc: denied { read } for name="tty" dev="sysfs" ino=18303 scontext=u:r:untrusted_app:s0:c98,c257,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0 I/flutter ( 5446): Another exception was thrown: SerialPortError: Permission denied, errno = 13 D/ViewRootImpl[MainActivity]( 5446): windowFocusChanged hasFocus=false inTouchMode=true D/ViewRootImpl[MainActivity]( 5446): windowFocusChanged hasFocus=true inTouchMode=true I/Surface ( 5446): opservice is null false W/1.ui ( 5446): type=1400 audit(0.0:22054): avc: denied { read } for name="tty" dev="sysfs" ino=18303 scontext=u:r:untrusted_app:s0:c98,c257,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0 I/flutter ( 5446): Another exception was thrown: SerialPortError: Permission denied, errno = 13 I/Surface ( 5446): opservice is null false
I don't know about an Usb Serial permission in Android... how to solve this problem ?
Thanks in advance !
You should be using FFI to access C libs. Example usage of ffigen with libserialport:
https://github.com/meta-flutter/ffigen/tree/jw/libserialport/example/libserialport
Some questions:
Where are the API documentation? I see many in the issues section here writing commands and methods thart are not mentioned at all in this github
How do I send strings via the serial port instead of sending bytes?
Thanks and hope to hear from you soon.
flutter_libserialport
and published on pub.dev.P.S. The package was previously called "flutter_serial_port" which conflicted with an old discontinued package by the same name: pub.dev/packages/flutter_serial_port.
P.P.S. Likewise, the respective Dart package was renamed from "dart_serial_port" to libserialport
.
* What went wrong:
A problem occurred configuring project ':flutter_libserialport'.
> NDK at Android/Sdk/ndk/21.1.6352462 did not have a source.properties file
Even through updated android studio to use latest version of NDK
I'm currently porting an app from Java/Swing to Flutter that running on Windows 11 that communicates with devices via serial. For the most part, everything works as expected. Occasionally, however, the baud rate doesn't set correctly. No errors are reported and calling the baud rate getter after opening the port returns the intended baud rate. Measuring the baud rate with an oscilloscope shows 9600 regardless of what I actually set the baud rate to in the code. The problem persists even after closing and reopening the app, restarting my PC, swapping USB/Serial converters, and changing which USB port the converter is plugged into. Interestingly, I can resolve the issue by opening the COM port in Putty (or any other application that uses the serial port). Once I have done this, the Flutter app again works as expected (for a couple of days) before the issue arises again. I've posted a snippet of my initialization code below for reference. (This was done with flutter_libserialport version 0.2.3).
try {
comPort = SerialPort(serialPort);
comPort.config = SerialPortConfig()
..baudRate = baudRate
..parity = parity
..bits = bits
..stopBits = stopBits;
comPort.openReadWrite();
} catch (e) {
print(e.toString());
}
Hey JP - not really an issue, just reaching for help.
Been using your plugin as a guide to building my own (c++ based) plugin (also read your article on medium), but I can't figure out how you bundled libserialport as a .framework. In short, I can't find the .podspec of libserialport (which you use as a dependency in the macos podspec). I can't find it in the Cocoapods Master Repo either.
Help would be much appreciated!
Added the package as a plugin. When launching debug on Linux Ubuntu (20.), it is unable to find stdlib.h within linux_termios.c and string.h within libserialport_internal.h. Would you have any ideas what this might be please?
Hello,
I am trying to use this plugin for a embedded linux flutter app. For that purpose I am using an external embedder for flutter on ARM and I provide only the bundle for the app using flutter build bundle
. Everything looks fine except that there is no libserialport.so generated after the flutter build bundle
command.
Do you have any idea what might caused the issue?
Best regards!
well can someone tell me
how to read data to readable String ?
The following error occurs when I create a Windows desktop application and call Flutter_libserialport: ^0.2.3 :
[libserialport] flutter pub get
Running "flutter pub get" in libserialport...
Because libserialport depends on flutter_libserialport ^0.2.3 which depends on libserialport ^0.2.0, libserialport ^0.2.0 is required.
So, because libserialport is 1.0.0+1, version solving failed.
pub get failed (1; So, because libserialport is 1.0.0+1, version solving failed.)
exit code 1
final portReader = SerialPortReader("/dev/ttyACM0");
try {
port.config.baudRate = baudrate;
port.config.bits = dataBits;
port.config.parity = parity;
port.config.stopBits = stopBits;
} catch (e, s) {
debugPrint("error : $e");
debugPrint("stack trace: $s");
}
error as below
SerialPortError: Invalid argument, errno = 22
flutter: stack trace: #0 Util.call (package:libserialport/src/util.dart:39:7)
flutter: #1 _SerialPortImpl.config (package:libserialport/src/port.dart:335:12)
When I ran the build for android, I got the following error.
The build environment is windows 10.
I have installed NDK(Side by side) ver21.1.6352462 in Android studio.
Building for windows x64(.exe) is no problem.
Can you give me some advice?
FAILURE: Build failed with an exception.
NDK not configured. Download it with SDK manager.
Hello my friend! Nice package!
My name is Jhon and I'm a flutter developer.
I'm working in a desktop project that I need to check the connection and capture the weight of a precison scale connected to computer by Serial USB.
Can your package help me?
I'm seeing that the package can check the connection and show information about the Serial USB Dispositive. But the weight? Can I capture that?
I am getting below error while running flutter app in Android. Same project run in Windows desktop fluently.
I have tested on Android 5, 10 & 11, getting same issue.
I also tested by varying flutter_libserialport versions{from:0.2.0 - to:0.2.3}
What will be the reason behind this issue ?
======== Exception caught by widgets library ================
The following SerialPortError was thrown building Builder:
No such file or directory, errno = 2
The relevant error-causing widget was:
Directionality Directionality:file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.8/lib/get_navigation/src/root/get_material_app.dart:217:12
When the exception was thrown, this was the stack:
#0 Util.call (package:libserialport/src/util.dart:39:7)
#1 _SerialPortImpl._init (package:libserialport/src/port.dart:221:10)
#2 new _SerialPortImpl (package:libserialport/src/port.dart:211:42)
#3 new SerialPort (package:libserialport/src/port.dart:72:38)
#4 new _HomeState (package:usb_serial_sample/ui/main.dart:51:23)
#5 Home.createState (package:usb_serial_sample/ui/main.dart:27:31)
#6 new StatefulElement (package:flutter/src/widgets/framework.dart:4677:25)
#7 StatefulWidget.createElement (package:flutter/src/widgets/framework.dart:737:38)
... Normal element mounting (169 frames)
#176 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#177 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6261:36)
#178 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6272:32)
... Normal element mounting (396 frames)
#574 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#575 Element.updateChild (package:flutter/src/widgets/framework.dart:3383:18)
#576 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1198:16)
#577 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1167:5)
#578 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:1112:18)
#579 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2531:19)
#580 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1111:13)
#581 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:944:7)
#582 WidgetsBinding.scheduleAttachRootWidget. (package:flutter/src/widgets/binding.dart:924:7)
(elided 11 frames from class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch)
Hi,
I just saw that dart_serial_port has already nullsafety and ffi1.0.0 dependency. Can you integrate that upgrade here also? I'd like to upgrade my application to flutter 2.
When I try to call the dispose()
method of a SerialPort
object, the app crashes. MacOS generates the following error report:
OS Version: macOS 12.1 (21C52)
...
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
<appName>(2663,0x304647000) malloc: *** error for object 0x600002dee4c0: pointer being freed was not allocated
abort() called
This happens when I execute the following method:
Future<void> disconnect() async {
try {
await sendString(data: "cliStop");
} catch (e) {
print(e);
}
_reader?.close();
port.close();
port.dispose(); // this is the line which crashes the app.
super.disconnect();
}
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm, locale de)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] Connected device (2 available)
Do you have any idea why this is happening? Any help is very much appreciated!
I have been usinig it for few weeks with no problem, but today it end up with these errors:
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:98:9: error: invalid application of 'sizeof' to an incomplete type 'struct termiox'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:106:15: error: incomplete definition of type 'struct termiox'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:106:27: error: use of undeclared identifier 'RTSXOFF'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:107:15: error: incomplete definition of type 'struct termiox'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:107:27: error: use of undeclared identifier 'CTSXON'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:108:15: error: incomplete definition of type 'struct termiox'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:108:27: error: use of undeclared identifier 'DTRXOFF'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:109:15: error: incomplete definition of type 'struct termiox'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:109:27: error: use of undeclared identifier 'DSRXON'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:118:7: error: incomplete definition of type 'struct termiox'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:118:22: error: use of undeclared identifier 'RTSXOFF'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:118:32: error: use of undeclared identifier 'CTSXON'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:118:41: error: use of undeclared identifier 'DTRXOFF'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:118:51: error: use of undeclared identifier 'DSRXON'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:121:8: error: incomplete definition of type 'struct termiox'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:121:21: error: use of undeclared identifier 'RTSXOFF'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:123:8: error: incomplete definition of type 'struct termiox'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:123:21: error: use of undeclared identifier 'CTSXON'
/home/kozak/Vyvoj/Eurosat/etrackermanagetool/linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/third_party/libserialport/linux_termios.c:125:8: error: incomplete definition of type 'struct termiox'
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Exception: Build process failed
I get the error Count must be in the range
as soon as I write to/read from serial port on Windows 10/11. I am using SerialPortReader
.
Getting this error on the first interaction is a blocking issue for our app.
I'd appreciate your help.
Where can I find our more about the above error?
The program crashed when the above happened.
Hello team, I'm having trouble making the connection.
SerialPortError access denied error = 5
I'm using flutter for desktop, do I need to add some special permission to be able to run on windows?
Thanks
Seems this issue still remains for Android #20
not sure if it's still not released for flutter_libserialport, I'm using 0.2.3 so I think that fix should have been merged. Anyway, the way I fix this is to comment out
#define HAVE_STRUCT_TERMIOX 1
in my /.pub-cache/hosted/pub.dartlang.org/flutter_libserialport-0.2.3/android/libserialport/config.h
My Code:
import 'package:flutter_libserialport/flutter_libserialport.dart';
void main() {
print(SerialPort.availablePorts);
}
Error Log:
Testing started at 15:53 ...
dart:ffi new DynamicLibrary.open
package:libserialport/src/dylib.dart 32:54 dylib
package:libserialport/src/port.dart 230:32 _SerialPortImpl.availablePorts.<fn>
package:libserialport/src/util.dart 37:21 Util.call
package:libserialport/src/port.dart 230:21 _SerialPortImpl.availablePorts
package:libserialport/src/port.dart 82:61 SerialPort.availablePorts
test/exploration/serial.dart 4:20 main
Failed to load "/Users/yowfung/workspace/proitav/projects/ApiTestTool/src/common/test/exploration/serial.dart": Invalid argument(s): Failed to load dynamic library 'libserialport.dylib': dlopen(libserialport.dylib, 0x0001): tried: '/Users/yowfung/Library/Flutter/bin/cache/dart-sdk/bin/./libserialport.dylib' (no such file), '/Users/yowfung/Library/Flutter/bin/cache/dart-sdk/bin/../../../libserialport.dylib' (no such file), '/Users/yowfung/Library/Flutter/bin/cache/dart-sdk/bin/Frameworks/libserialport.dylib' (no such file), '/Users/yowfung/Library/Flutter/bin/cache/dart-sdk/bin/./libserialport.dylib' (no such file), '/Users/yowfung/Library/Flutter/bin/cache/dart-sdk/bin/../../../libserialport.dylib' (no such file), '/Users/yowfung/Library/Flutter/bin/cache/dart-sdk/bin/Frameworks/libserialport.dylib' (no such file), 'libserialport.dylib' (no such file), '/usr/lib/libserialport.dylib' (no such file), '/Users/yowfung/workspace/proitav/projects/ApiTestTool/src/common/libserialport.dylib' (no such file), '/usr/lib/libserialport.dylib' (no such file)
Process finished with exit code 1
Description of this plug-in on pub.dev:
flutter_libserialport
is a simple wrapper around thelibserialport
Dart package, utilizing Flutter's build system to build and deploy thelibserialport
C-library under the hood. This package does not provide any additional API, but merely helps to make thelibserialport
Dart package work "out of the box" without the need of manually building and deploying thelibserialport
C-library.
Do I need any additional configuration?
[✓] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale zh-Hans-CN)
• Flutter version 2.5.3 at /Users/yowfung/Library/Flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (7 weeks ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/yowfung/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = /Users/yowfung/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.1, Build version 13A1030d
• CocoaPods version 1.10.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] IntelliJ IDEA Community Edition (version 2021.2.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 61.2.4
• Dart plugin version 212.5486
[✓] VS Code (version 1.57.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.25.0
[✓] Proxy Configuration
• HTTP_PROXY is set
• NO_PROXY is
localhost,0.0.0.0,127.0.0.1,192.168.1.253,192.168.1.250,192.168.1.251,192.168.5.253,192.168.0.
122,192.168.*,169.254.1.1,169.254.*
• NO_PROXY contains 127.0.0.1
• NO_PROXY contains localhost
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 12.0.1 21A559 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.55
• No issues found!
Hello Friend!
I'm having trouble configuring the serial port.
When I test connecting an arduino through Putty, the Flutter serial connection works.
If I disconnect the arduino from the USB port and connect right after, the connection reads the data without sync.
My code:
void conectarNaSerial(int address) {
final port = SerialPort.fromAddress(address);
port.open(mode: 1);
if(port.isOpen) {
port.config.baudRate = 115200;
port.config.stopBits = 1;
port.config.bits = 8;
port.config.parity = SerialPortParity.none;
port.config.setFlowControl(SerialPortFlowControl.none);
reader = SerialPortReader(port);
if(reader != null){
reader!.stream.listen((d){
print("${utf8.decode(d)}");
var number = double.tryParse(utf8.decode(d));
if(number == null){
return;
} else {
valorSerial.value = number;
}
});
}
}
}
I must configure the serial port right after connecting, right?
I got the above error.
Can someone shed some light what this error all about?
Thanks
Hi, does this lib support the serial port hot plug? if not, could you please help to give me some suggestion about how to implement this? Thanks for your support!
Please excuse if im asking a simple question
Is there a set process to installing this manually thats outside the usual add to pubspec and import steps ?
I found an error in windows:
FileSystemException: Cannot create link, path = 'D:\Work\project\Fin Monitor Arduino PyQT5\fin_monitor_app\windows\flutter\ephemeral\.plugin_symlinks\flutter_libserialport' (OS Error: Incorrect function. , errno = 1)
Error: TimeoutException after 0:00:03.000000: No stream event
Lost connection to device
What could cause such a drastic crash?
Here is a snippet of the code
SerialPortConfig serialConfig = SerialPortConfig();
var port = SerialPort(serialPort);
print("readSerialPort: get reader");
SerialPortReader reader = SerialPortReader(port);
String resultString = "";
Try {
final timeout = const Duration(seconds: 3);
await for (Uint8List data in reader.stream.timeout(timeout)) {
if (data.isNotEmpty) resultString = resultString + String.fromCharCodes(data);
if (checkString == commandEndString) {
print("End reach\n");
reader.close();
}
}
} catch (e) {
reader.close();
port.flush();
port.close();
serialConfig.dispose();
port.dispose();
return Future.error(e.toString(), StackTrace.current);
}
What went wrong?
Hello everyone,
I am from Brasil and my name is Breno Santos.
Nowaday i'm using your library flutter_libserialport to work and i would like to know if is possible to change the BaudRate, how can i do that? It seens that value is fixed at 9600, i would like to use others value.
Looking foward to hear from you soon.
Best Regards!
I tried using the sample code to try and communicate with an Arduino Uno that just simply prints some string to serial port periodically. I couldn't get it to work, the data I receive are all empty. I would really appreciate any help regarding this. Thank you.
linux/flutter/ephemeral/.plugin_symlinks/flutter_libserialport/linux/flutter_libserialport_plugin.cc:40:3: error: use of undeclared identifier 'setenv'; did you mean 'g_setenv'?
name: learn
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
flutter_libserialport: ^0.2.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
Hi,
I am using your library to communicate with a serial device. I can write to the serial port, but I am only able to read from the serial port using the read() method. I can't use the SerialPortReader() to perform the same action. This is how I use it:
/// read when response is enabled
Future<String> readSerial() async {
// _sp is the the serial port I am working with.
// This works
print('num bytes available: ${(_sp.bytesAvailable)}');
var data = _sp.read(_sp.bytesAvailable);
print('data is ${utf8.decode(data)}');
return utf8.decode(data);
// This doesnot work
log.info('reading from the serial port');
final reader = SerialPortReader(_sp);
if (reader != null) {
log.info('listening to serial port');
reader.stream.listen((data) {
log.info('received: $data');
return data.toString();
});
reader.close();
}
return null;
}
}
Any help is appreciated.
P.S. It would be nice to mention in your example that the SerialPortConfig should be configured before opening the serial port. I assumed a default configuration was used and it took me a while to figure out that this should've been done. Thanks!
Hello,
I run you plugin on android no root,
I can't get the availablePorts.
This is the devices I have, and they have permission.
And if I give the path directly to new SerialPort("/dev/ttyUSER0"),
it throw permission denied , error 13.
But if I use the plugin serial_port_flutter, I can get the list.
Could you help me?
Thanks.
Create a podspec for libserialport and push on CocoaPods?
i don't know if that is issue or configuration error, but the maximum number of bytes to send is limited by 80 bytes. how we can send more than 80 bytes?
flutter run -d windows
:
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Launching lib\main.dart on Windows in debug mode...
Building Windows application...
flutter_libserialport_plugin.obj : error LNK2019: 无法解析的外部符号 __imp__invalid_parameter,函数 "void * __cdecl std::_Allocate_manually_vector_aligned<struct std::_Default_allocate_traits>(unsigned __int64)" (??$_Allocate_manually_vector_aligned@U_Default_allocate_traits@std@@@std@@YAPEAX_K@Z) 中引用了该符号 [D:\workspace\proitav\git\APITester\src\gui\build\windows\plugins\flutter_libserialport\flutter_libserialport_plugin.vcxproj]
flutter_wrapper_plugin.lib(plugin_registrar.obj) : error LNK2001: 无法解析的外部符号 __imp__invalid_parameter [D:\workspace\proitav\git\APITester\src\gui\build\windows\plugins\flutter_libserialport\flutter_libserialport_plugin.vcxproj]
flutter_wrapper_plugin.lib(core_implementations.obj) : error LNK2001: 无法解析的外部符号 __imp__invalid_parameter [D:\workspace\proitav\git\APITester\src\gui\build\windows\plugins\flutter_libserialport\flutter_libserialport_plugin.vcxproj]
flutter_libserialport_plugin.obj : error LNK2019: 无法解析的外部符号 __imp__CrtDbgReport,函数 "void * __cdecl std::_Allocate_manually_vector_aligned<struct std::_Default_allocate_traits>(unsigned __int64)" (??$_Allocate_manually_vector_aligned@U_Default_allocate_traits@std@@@std@@YAPEAX_K@Z) 中引用了该符号 [D:\workspace\proitav\git\APITester\src\gui\build\windows\plugins\flutter_libserialport\flutter_libserialport_plugin.vcxproj]
flutter_wrapper_plugin.lib(plugin_registrar.obj) : error LNK2001: 无法解析的外部符号 __imp__CrtDbgReport [D:\workspace\proitav\git\APITester\src\gui\build\windows\plugins\flutter_libserialport\flutter_libserialport_plugin.vcxproj]
flutter_wrapper_plugin.lib(core_implementations.obj) : error LNK2001: 无法解析的外部符号 __imp__CrtDbgReport [D:\workspace\proitav\git\APITester\src\gui\build\windows\plugins\flutter_libserialport\flutter_libserialport_plugin.vcxproj]
D:\workspace\proitav\git\APITester\src\gui\build\windows\plugins\flutter_libserialport\Debug\flutter_libserialport_plugin.dll : fatal error LNK1120: 2 个无法解析的外部命令 [D:\workspace\proitav\git\APITester\src\gui\build\windows\plugins\flutter_libserialport\flutter_libserialport_plugin.vcxproj]
Exception: Build process failed.
flutter --version
:
Flutter 2.10.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db747aa133 (8 days ago) • 2022-02-09 13:57:35 -0600
Engine • revision ab46186b24
Tools • Dart 2.16.1 • DevTools 2.9.2
HI, I have some trouble when I try to open serial port and write something into it on macOS. I use flutter_libserialport version 0.2.2.
My code is really simple:
final SerialPort sp = SerialPort("/dev/cu.usbserial-1420");
try
{
if (sp.openWrite())
{
final SerialPortConfig cfg = SerialPortConfig();
cfg.baudRate = 115200;
cfg.bits = 8;
cfg.parity = -1;
cfg.stopBits = 1;
cfg.rts = 0;
cfg.cts = 0;
cfg.dtr = 0;
cfg.dsr = 0;
cfg.xonXoff = 0;
sp.config = cfg;
sp.write(Uint8List.fromList(rc.hex.codeUnits), timeout: 100);
sp.close();
}
else
{
Logging.info(this, "error opening serial port: " + SerialPort.lastError.toString());
}
}
on Exception catch (e)
{
Logging.info(this, "can not write into serial port: " + SerialPort.lastError.toString());
}
sp.dispose();
However, I have an error when openWrite method is called:
flutter: onpc: #0201 RiCommandsMap: sending NUMBER_3 to USB-RI interface /dev/cu.usbserial-1420
flutter: onpc: #0202 RiCommandsMap: error opening serial port: SerialPortError: Operation not permitted, errno = 1
There are two ports available in the system:
family@mac-mini ~ % ls -la /dev/cu*
crw-rw-rw- 1 root wheel 19, 1 5 окт 20:47 /dev/cu.Bluetooth-Incoming-Port
crw-rw-rw- 1 root wheel 19, 3 5 окт 20:47 /dev/cu.usbserial-1420
family@mac-mini ~ % whoami
family
family@mac-mini ~ % id -Gn family
staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.access_ssh com.apple.sharepoint.group.5 com.apple.sharepoint.group.1 com.apple.sharepoint.group.2 com.apple.sharepoint.group.4 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_remote_ae com.apple.sharepoint.group.3
My Flutter version is:
[✓] Flutter (Channel stable, 2.2.1, on macOS 11.0.1 20B29 darwin-x64, locale en-GB)
• Flutter version 2.2.1 at /Volumes/ExtWork/home/family/work/android/flutter
• Framework revision 02c026b03c (4 месяца назад), 2021-05-27 12:24:44 -0700
• Engine revision 0fdb562ac8
• Dart version 2.13.1
When I use, for example, this port in the "SerialTool" app with the same settings, it works as desired:
Could you please explain me that is the reason for such an error?
when I set baudrate it does not work at all.
my code:
commPort = SerialPort(portName);
if (!commPort.openReadWrite()) {
print(SerialPort.lastError);
return false;
}
commPort.config.rts = SerialPortRts.on;
commPort.config.cts = SerialPortCts.flowControl;
commPort.config.xonXoff = SerialPortXonXoff.disabled;
commPort.config.setFlowControl(SerialPortFlowControl.rtsCts);
disable xonxoff and set flow control to rts/cts, but still canot get 0x13 and 0x11, please help me.
The log shows:
Task :app:compileFlutterBuildRelease
Dart snapshot generator failed with exit code -1073741819
Task :app:compileFlutterBuildRelease FAILED
FAILURE: Build failed with an exception.
Where:
Script 'D:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'D:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileFlutterBuildRelease'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTask
Executer.java:200)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.
java:198)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:17
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.execute(DefaultTaskExecutionGraph.java:177)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:39)
at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:40)
at org.gradle.execution.DefaultBuildWorkExecutor.access$000(DefaultBuildWorkExecutor.java:24)
at org.gradle.execution.DefaultBuildWorkExecutor$1.proceed(DefaultBuildWorkExecutor.java:48)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:49)
at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:40)
at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:33)
at org.gradle.execution.IncludedBuildLifecycleBuildWorkExecutor.execute(IncludedBuildLifecycleBuildWorkExecutor.
java:36)
at org.gradle.execution.DeprecateUndefinedBuildWorkExecutor.execute(DeprecateUndefinedBuildWorkExecutor.java:42)
at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor$ExecuteTasks.run(BuildOperationFiringBuildWorker
Executor.java:57)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:
71)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperation
Wrapper.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor.execute(BuildOperationFiringBuildWorkerExecutor.
java:42)
at org.gradle.initialization.DefaultGradleLauncher.runWork(DefaultGradleLauncher.java:265)
at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:174)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:126)
at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:72)
at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:67)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:178)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.ja
va:63)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRun
ner.java:67)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRun
ner.java:41)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.jav
a:49)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.jav
a:44)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildO
perationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildO
perationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java
:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperatio
nWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:4
4)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:54)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:87)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:53)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleB
uildActionExecuter.java:33)
at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:49)
at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActio
nExecuter.java:32)
at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActio
nExecuter.java:27)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java
:104)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java
:55)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.
java:64)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.
java:37)
at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.lambda$execute$0(SessionScopeLi
fecycleBuildActionExecuter.java:54)
at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:67)
at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBu
ildActionExecuter.java:50)
at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBu
ildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.
java:36)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.
java:25)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionE
xecuter.java:59)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionE
xecuter.java:31)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingAct
ionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingAct
ionExecuter.java:41)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.ja
va:35)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.process.internal.ExecException: Process 'command 'D:\flutter\bin\flutter.bat'' finished with non-z
ero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:414
)
at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:38)
at org.gradle.process.internal.DefaultExecActionFactory.exec(DefaultExecActionFactory.java:175)
at org.gradle.api.internal.project.DefaultProject.exec(DefaultProject.java:1155)
at org.gradle.api.internal.project.DefaultProject.exec(DefaultProject.java:1150)
at org.gradle.api.Project$exec$6.call(Unknown Source)
at BaseFlutterTask.buildBundle(D:\flutter\packages\flutter_tools\gradle\flutter.gradle:1102)
at BaseFlutterTask$buildBundle.callCurrent(Unknown Source)
at FlutterTask.build(D:\flutter\packages\flutter_tools\gradle\flutter.gradle:1227)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:555)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperation
Wrapper.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.j
ava:540)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.
java:523)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java
:108)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFil
es(ExecuteActionsTaskExecuter.java:271)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskEx
ecuter.java:260)
at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:34)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:34)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67)
at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34)
at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43)
at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44)
at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54)
at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38)
at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:42
)
at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159)
at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72)
at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92)
at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsF
inishedStep.java:36)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsF
inishedStep.java:26)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.j
ava:79)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.j
ava:53)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsSt
artedStep.java:39)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28)
at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.
java:187)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:17
9)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:
109)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter
.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExec
uter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j
ava:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36
)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77
)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildO
perationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildO
perationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java
:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperatio
nWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecuti
onGraph.java:372)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecuti
onGraph.java:359)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTa
skExecutionGraph.java:352)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTa
skExecutionGraph.java:338)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.execution.plan.DefaultPlanExecutor.process(DefaultPlanExecutor.java:72)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.executeWithServices(DefaultTaskExecutionGraph.java:1
84)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.execute(DefaultTaskExecutionGraph.java:177)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:39)
at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:40)
at org.gradle.execution.DefaultBuildWorkExecutor.access$000(DefaultBuildWorkExecutor.java:24)
at org.gradle.execution.DefaultBuildWorkExecutor$1.proceed(DefaultBuildWorkExecutor.java:48)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:49)
at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:40)
at org.gradle.execution.DefaultBuildWorkExecutor.execute(DefaultBuildWorkExecutor.java:33)
at org.gradle.execution.IncludedBuildLifecycleBuildWorkExecutor.execute(IncludedBuildLifecycleBuildWorkExecutor.
java:36)
at org.gradle.execution.DeprecateUndefinedBuildWorkExecutor.execute(DeprecateUndefinedBuildWorkExecutor.java:42)
at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor$ExecuteTasks.run(BuildOperationFiringBuildWorker
Executor.java:57)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:
71)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperation
Wrapper.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
at org.gradle.execution.BuildOperationFiringBuildWorkerExecutor.execute(BuildOperationFiringBuildWorkerExecutor.
java:42)
at org.gradle.initialization.DefaultGradleLauncher.runWork(DefaultGradleLauncher.java:265)
at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:174)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:126)
at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:72)
at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:67)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:178)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.ja
va:63)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRun
ner.java:67)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRun
ner.java:41)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.jav
a:49)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.jav
a:44)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildO
perationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildO
perationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java
:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperatio
nWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:4
4)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:54)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:87)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:53)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleB
uildActionExecuter.java:33)
at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:49)
at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActio
nExecuter.java:32)
at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActio
nExecuter.java:27)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java
:104)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java
:55)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.
java:64)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.
java:37)
at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.lambda$execute$0(SessionScopeLi
fecycleBuildActionExecuter.java:54)
at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:67)
at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBu
ildActionExecuter.java:50)
at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBu
ildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.
java:36)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.
java:25)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionE
xecuter.java:59)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionE
xecuter.java:31)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingAct
ionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingAct
ionExecuter.java:41)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.ja
va:35)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 22s
1 actionable task: 1 executed
First of all thank you for this package.
Would like to know if it's possible to have an example for reading data from a serial port using flutter.
My goal is to use the serial port on an Android Set Top Box (N1 Max) capable of reading data from Arduino.
SerialPortReader: when is OnDone called?
When I am done with reading in OnData, I tried to call reader.close(); but it crash the app.
When is OnDone called?
my projecr need serial and hive 。but Pub get is error .
Because hive_flutter >=1.0.0 depends on path_provider ^2.0.0 which depends on path_provider_windows ^2.0.0, hive_flutter >=1.0.0 requires path_provider_windows ^2.0.0.
And because path_provider_windows >=0.1.0-nullsafety.3 depends on ffi ^1.0.0, hive_flutter >=1.0.0 requires ffi ^1.0.0.
And because every version of flutter_serial_port from git depends on dart_serial_port ^0.0.3 which depends on ffi ^0.1.3, hive_flutter >=1.0.0 is incompatible with flutter_serial_port from git.
So, because heavymetal depends on both flutter_serial_port from git and hive_flutter ^1.0.0, version solving failed.
pub get failed (1; So, because heavymetal depends on both flutter_serial_port from git and hive_flutter ^1.0.0, version solving failed.)
How to solve this problem
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.