I converted h5 file to tflite.
This h5 file was a ml5 Json model.
I Just converted to h5 file by myself.
But it's not work with error code.
ml5 model link : https://github.com/CodingTrain/website/tree/master/learning/ml5/7.2_pose_classifier/p5-multi/1%20-%20Data%20Collection/model2
Windows10, Python 3.6.8, tfv2.0.0
code:
import tensorflow as tf
model=tf.keras.models.load_model("E:\h5\outputs\model.h5")
converter = tf.lite.TFLiteConverter.from_keras_model(model)
converter.experimental_new_converter = True
tflite_model = converter.convert()
open("E:\h5\converted_model.tflite", "wb").write(tflite_model)
I converted file with these code
and This model file is put into my app.
Error code:
[+14766 ms] D/ViewRootImpl#454dd0a[MainActivity]( 1610): ViewPostIme pointer 0
[ +133 ms] D/ViewRootImpl#454dd0a[MainActivity]( 1610): ViewPostIme pointer 1
[ +13 ms] I/tflite ( 1610): Initialized TensorFlow Lite runtime.
[ +36 ms] I/flutter ( 1610): success
[ +12 ms] I/CameraManagerGlobal( 1610): Camera 0 facing CAMERA_FACING_BACK state now
CAMERA_STATE_OPEN for client com.example.examplerealtime API Level 2
[ +9 ms] D/SensorManager( 1610): registerListener :: 1, LSM6DSO Acceleration Sensor,
200000, 0,
[ +86 ms] W/Gralloc3( 1610): allocator 3.x is not supported
[ +573 ms] I/CameraManagerGlobal( 1610): Camera 0 facing CAMERA_FACING_BACK state now
CAMERA_STATE_ACTIVE for client com.example.examplerealtime API Level 2
[ +37 ms] I/CameraManagerGlobal( 1610): Camera 0 facing CAMERA_FACING_BACK state now
CAMERA_STATE_IDLE for client com.example.examplerealtime API Level 2
[ +146 ms] I/Choreographer( 1610): Skipped 44 frames! The application may be doing too
much work on its main thread.
[ +499 ms] I/CameraManagerGlobal( 1610): Camera 0 facing CAMERA_FACING_BACK state now
CAMERA_STATE_ACTIVE for client com.example.examplerealtime API Level 2
[ +118 ms] D/RenderScript HIDL Adaptation( 1610): IRenderScriptDevice::getService()
[ +11 ms] D/RenderScript HIDL Adaptation( 1610): IRenderScriptDevice::getService()
returned 0x78d5593060
[ ] D/RenderScript HIDL Adaptation( 1610): HIDL successfully loaded.
[ +1 ms] V/RenderScript( 1610): ARM mali (64 bit) RenderScript Compute Driver
[ +40 ms] V/RenderScript( 1610): Successfully loaded runtime: libRSDriverArm.so
[ +1 ms] D/ ( 1610): Successfully queried cache dir:
/data/user_de/0/com.example.examplerealtime/code_cache
[ ] D/RenderScript( 1610): Setting cache dir:
/data/user_de/0/com.example.examplerealtime/code_cache
[ +31 ms] E/MethodChannel#tflite( 1610): Failed to handle method call
[ ] E/MethodChannel#tflite( 1610): java.lang.IllegalArgumentException: Unsupported
value: java.lang.ArrayIndexOutOfBoundsException: length=2; index=3
[ ] E/MethodChannel#tflite( 1610): at
io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:278)
[ ] E/MethodChannel#tflite( 1610): at
io.flutter.plugin.common.StandardMethodCodec.encodeErrorEnvelope(StandardMethodCodec.java
:69)
[ ] E/MethodChannel#tflite( 1610): at
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.ja
va:236)
[ ] E/MethodChannel#tflite( 1610): at
sq.flutter.tflite.TflitePlugin.onMethodCall(TflitePlugin.java:113)
[ ] E/MethodChannel#tflite( 1610): at
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.
java:226)
[ ] E/MethodChannel#tflite( 1610): at
io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:8
5)
[ ] E/MethodChannel#tflite( 1610): at
io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631)
[ ] E/MethodChannel#tflite( 1610): at
android.os.MessageQueue.nativePollOnce(Native Method)
[ ] E/MethodChannel#tflite( 1610): at
android.os.MessageQueue.next(MessageQueue.java:336)
[ ] E/MethodChannel#tflite( 1610): at android.os.Looper.loop(Looper.java:197
)
[ ] E/MethodChannel#tflite( 1610): at
android.app.ActivityThread.main(ActivityThread.java:7777)
[ ] E/MethodChannel#tflite( 1610): at java.lang.reflect.Method.invoke(Native
Method)
[ ] E/MethodChannel#tflite( 1610): at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
[ ] E/MethodChannel#tflite( 1610): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
[ +4 ms] E/flutter ( 1610): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled
Exception: PlatformException(error, Unsupported value:
java.lang.ArrayIndexOutOfBoundsException: length=2; index=3, null)
[ ] E/flutter ( 1610): #0 StandardMethodCodec.decodeEnvelope
(package:flutter/src/services/message_codecs.dart:569:7)
[ ] E/flutter ( 1610): #1 MethodChannel._invokeMethod
(package:flutter/src/services/platform_channel.dart:156:18)
[ ] E/flutter ( 1610): <asynchronous suspension>
[ ] E/flutter ( 1610): #2 MethodChannel.invokeMethod
(package:flutter/src/services/platform_channel.dart:329:12)
[ ] E/flutter ( 1610): #3 Tflite.runModelOnFrame
(package:tflite/tflite.dart:67:27)
[ ] E/flutter ( 1610): #4 _CameraState.initState.<anonymous
closure>.<anonymous closure> (package:flutter_realtime_detection/camera.dart:49:22)
[ ] E/flutter ( 1610): #5 CameraController.startImageStream.<anonymous
closure> (package:camera/camera.dart:353:20)
[ ] E/flutter ( 1610): #6 _rootRunUnary (dart:async/zone.dart:1192:38)
[ ] E/flutter ( 1610): #7 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
[ ] E/flutter ( 1610): #8 _CustomZone.runUnaryGuarded
(dart:async/zone.dart:987:7)
[ ] E/flutter ( 1610): #9 _BufferingStreamSubscription._sendData
(dart:async/stream_impl.dart:339:11)
[ ] E/flutter ( 1610): #10 _DelayedData.perform
(dart:async/stream_impl.dart:594:14)
[ ] E/flutter ( 1610): #11 _StreamImplEvents.handleNext
(dart:async/stream_impl.dart:710:11)
[ ] E/flutter ( 1610): #12 _PendingEvents.schedule.<anonymous closure>
(dart:async/stream_impl.dart:670:7)
[ ] E/flutter ( 1610): #13 _rootRun (dart:async/zone.dart:1180:38)
[ ] E/flutter ( 1610): #14 _CustomZone.run (dart:async/zone.dart:1077:19)
[ ] E/flutter ( 1610): #15 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
[ +1 ms] E/flutter ( 1610): #16 _CustomZone.bindCallbackGuarded.<anonymous closure>
(dart:async/zone.dart:1019:23)
[ ] E/flutter ( 1610): #17 _rootRun (dart:async/zone.dart:1184:13)
[ ] E/flutter ( 1610): #18 _CustomZone.run (dart:async/zone.dart:1077:19)
[ ] E/flutter ( 1610): #19 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
[ ] E/flutter ( 1610): #20 _CustomZone.bindCallbackGuarded.<anonymous closure>
(dart:async/zone.dart:1019:23)
[ ] E/flutter ( 1610): #21 _microtaskLoop
(dart:async/schedule_microtask.dart:43:21)
[ ] E/flutter ( 1610): #22 _startMicrotaskLoop
(dart:async/schedule_microtask.dart:52:5)
[ ] E/flutter ( 1610):
[ +482 ms] W/System ( 1610): A resource failed to call close.
[ +1 ms] W/System ( 1610): A resource failed to call destroy.
[ +18 ms] I/chatty ( 1610): uid=10403(com.example.examplerealtime) FinalizerDaemon
identical 1 line
[ ] W/System ( 1610): A resource failed to call destroy.
[+7729 ms] I/CameraManagerGlobal( 1610): Camera 0 facing CAMERA_FACING_BACK state now
CAMERA_STATE_CLOSED for client com.example.examplerealtime API Level 2
What is the cause of the error?
Related
I added SHA256 and SHA1 keys to Firebase console. Enabled Device Check API in console. After doing all of these, I downloaded new google-services.json file and implemented it in my project. Still it gives errors on emulator.
[ +52 ms] D/EGL_emulation(13977): app_time_stats: avg=1078.88ms min=4.84ms max=37911.18ms count=36
[ +841 ms] E/zzf (13977): Problem retrieving SafetyNet Token: 7:
[ +64 ms] W/System (13977): Ignoring header X-Firebase-Locale because its value was null.
[ +105 ms] E/FirebaseAuth(13977): [GetAuthDomainTask] IOException occurred: javax.net.ssl.SSLHandshakeException: Chain validation failed
[ +43 ms] E/zzf (13977): Failed to get reCAPTCHA token with error [An internal error has occurred.]- calling backend without app verification
[ +15 ms] W/System (13977): Ignoring header X-Firebase-Locale because its value was null.
[ +8 ms] D/EGL_emulation(13977): app_time_stats: avg=38990.40ms min=38990.40ms max=38990.40ms count=1
[ +16 ms] D/EGL_emulation(13977): app_time_stats: avg=54.82ms min=4.19ms max=752.07ms count=18
[ +68 ms] E/FirebaseAuth(13977): [SmsRetrieverHelper] SMS verification code request failed: unknown status code: 17499 Chain validation failed
[ +4 ms] E/flutter (13977): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'Null' is not a subtype of type 'String'
[ ] E/flutter (13977): #0 MethodChannelFirebaseAuth.verifyPhoneNumber.<anonymous closure> (package:firebase_auth_platform_interface/src/method_channel/method_channel_firebase_auth.dart:599:35)
[ ] E/flutter (13977): #1 _rootRunUnary (dart:async/zone.dart:1434:47)
[ ] E/flutter (13977): #2 _CustomZone.runUnary (dart:async/zone.dart:1335:19)
[ ] E/flutter (13977): #3 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
[ ] E/flutter (13977): #4 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
[ ] E/flutter (13977): #5 _DelayedData.perform (dart:async/stream_impl.dart:591:14)
[ ] E/flutter (13977): #6 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
[ ] E/flutter (13977): #7 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
[ ] E/flutter (13977): #8 _rootRun (dart:async/zone.dart:1418:47)
[ ] E/flutter (13977): #9 _CustomZone.run (dart:async/zone.dart:1328:19)
[ ] E/flutter (13977): #10 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
[ ] E/flutter (13977): #11 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
[ ] E/flutter (13977): #12 _rootRun (dart:async/zone.dart:1426:13)
[ ] E/flutter (13977): #13 _CustomZone.run (dart:async/zone.dart:1328:19)
[ ] E/flutter (13977): #14 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
[ ] E/flutter (13977): #15 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
[ ] E/flutter (13977): #16 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
[ ] E/flutter (13977): #17 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
[ ] E/flutter (13977):
Basic Code:
Future<void> phoneVerify() async {
print(telefonController.text);
try {
await firebaseAuth.verifyPhoneNumber(
phoneNumber: telefonController.text,
verificationCompleted: (PhoneAuthCredential credential) async {},
verificationFailed: (FirebaseAuthException e) {},
codeSent: (String verificationId, int? resendToken) async {},
codeAutoRetrievalTimeout: (String verificationId) {},
timeout: Duration(seconds: 60),
);
} catch (c) {
telefonController.clear();
print(c.toString());
Navigator.pop(context);
if (c == 'invalid-verification-code') {
} else {}
}
}
Is there a step I skipped?
I had the same problem ,Enabled Device Check API in console is work for me !
I built a plugin which uses Dart FFI and a shared lib and published to pub.dev. Whenever I try using the plugin in my app, it always fails with a file not found error and I don't know where the error is coming from.
Error:
[ ] [ ] origin/stable
[ ] [ ] executing: [/home/francis/Development/flutter/] git ls-remote --get-url origin
[ ] [ +10 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] [ ] https://github.com/flutter/flutter.git
[ ] [ +160 ms] executing: [/home/francis/Development/flutter/] git rev-parse --abbrev-ref HEAD
[ ] [ +12 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] [ ] stable
[ ] [ +139 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ +6 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ +212 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +9 ms] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ +3 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +1 ms] [ +96 ms] Initializing file store
[ ] [ +28 ms] Done initializing file store
[ ] [ +96 ms] Skipping target: gen_localizations
[ ] [ +16 ms] Skipping target: gen_dart_plugin_registrant
[ ] [+1046 ms] Skipping target: unpack_linux
[ ] [ +989 ms] Skipping target: kernel_snapshot
[ ] [ +391 ms] Skipping target: debug_bundle_linux-x64_assets
[ ] [ ] Persisting file store
[ ] [ +19 ms] Done persisting file store
[ ] [ +7 ms] build succeeded.
[ ] [ +11 ms] "flutter assemble" took 2,983ms.
[ ] [ +260 ms] ensureAnalyticsSent: 255ms
[ ] [ +2 ms] Running shutdown hooks
[ ] [ ] Shutdown hooks complete
[ ] [ +1 ms] exiting with code 0
[ +922 ms] [2/5] Building CXX object CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o
[ +1 ms] FAILED: CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o
[ +5 ms] /usr/bin/clang++ -DAPPLICATION_ID=\"com.example.dspace\"
-I/home/francis/AndroidStudioProjects/dspace/linux/flutter/ephemeral
-I/home/francis/AndroidStudioProjects/dspace/linux/flutter/ephemeral/.plugin_symlinks/size/linux/src -isystem
/usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/glib-2.0 -isystem
/usr/lib/glib-2.0/include -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem
/usr/include/libpng16 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem
/usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/lzo -isystem /usr/include/pixman-1
-isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/cloudproviders
-isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/dbus-1.0 -isystem
/usr/lib/dbus-1.0/include -isystem /usr/include/at-spi-2.0 -g -Wall -Werror -pthread -std=gnu++17 -MD -MT
CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o -MF
CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o.d -o
CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o -c
/home/francis/AndroidStudioProjects/dspace/linux/flutter/generated_plugin_registrant.cc
[ +14 ms] /home/francis/AndroidStudioProjects/dspace/linux/flutter/generated_plugin_registrant.cc:9:10:
fatal error: 'size/size_plugin.h' file not found
[ +1 ms] #include <size/size_plugin.h>
[ ] ^~~~~~~~~~~~~~~~~~~~
[ ] 1 error generated.
[ +417 ms] [3/5] Building CXX object CMakeFiles/dspace.dir/my_application.cc.o
[ +2 ms] ninja: build stopped: subcommand failed.
[ +42 ms] Building Linux application... (completed in 6.8s)
[+6533 ms] Exception: Build process failed
[ +4 ms] "flutter run" took 13,967ms.
[ +18 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>
[ +260 ms] ensureAnalyticsSent: 254ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
I've modified my cmake file severally to fix this and tried various include methods but to no avail.
Current cmake:
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17) # Use C++17 lib
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1)
#set(CMAKE_BUILD_TYPE RELEASE)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
project(size_plugin VERSION 1.0.0 LANGUAGES CXX)
set(PLUGIN_NAME "size_plugin")
set(HEADER_FILES "src/size_plugin.h")
set(SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/size_plugin.cc")
message(${FLUTTER_MANAGED_DIR})
message(${HEADER_FILES} ${CMAKE_SOURCE_DIR})
#add_library(size SHARED src/fsize.cpp)
add_library(${PLUGIN_NAME} SHARED
${HEADER_FILES}
${SOURCE_FILES}
)
apply_standard_settings(${PLUGIN_NAME})
#target_include_directories(${PLUGIN_NAME} INTERFACE ${HEADER_FILES})
target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_link_libraries(${PLUGIN_NAME} PRIVATE flutter)
target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK)
#add_executable(size_test src/fsize.cpp)
My pubspec
name: size
description: A simple plugin that can display disk size on desktop.
version: 1.0.3
repository: https://github.com/Clashkid155/size
issue_tracker: https://github.com/Clashkid155/size/issues
# homepage: https://www.example.com
environment:
sdk: '>=2.14.3 <3.0.0'
flutter: '>=1.20.0 '
flutter:
plugin:
platforms:
linux:
pluginClass: SizePlugin
windows:
pluginClass: SizePlugin
dependencies:
ffi: ^1.1.2
path: ^1.8.0
Every info provided is from my plugin and not the flutter app am trying to build cause the whole issue started when i add that plugin
I've been using this as reference.
My only option now is to rebuild the plugin using method channel as that was the first iteration of the plugin but i didn't what to depend on flutter and dart FFI was easier with less code needed.
Update:
I've solved the above error by regenerating the plugin as a flutter plugin which added the missing file.
Now I've another build error
[ +71 ms] [4/7] Building CXX object CMakeFiles/dspace.dir/my_application.cc.o
[ +91 ms] [5/7] Linking CXX shared library plugins/size/libsize_plugin.so
[ +255 ms] [6/7] Linking CXX executable intermediates_do_not_run/dspace
[ ] FAILED: intermediates_do_not_run/dspace
[ +2 ms] : && /usr/bin/clang++ -g CMakeFiles/dspace.dir/main.cc.o
CMakeFiles/dspace.dir/my_application.cc.o CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o -o
intermediates_do_not_run/dspace
-Wl,-rpath,/home/francis/AndroidStudioProjects/dspace/build/linux/x64/debug/plugins/size:/home/francis/Androi
dStudioProjects/dspace/linux/flutter/ephemeral: plugins/size/libsize_plugin.so
/home/francis/AndroidStudioProjects/dspace/linux/flutter/ephemeral/libflutter_linux_gtk.so
/usr/lib/libgtk-3.so /usr/lib/libgdk-3.so /usr/lib/libz.so /usr/lib/libpangocairo-1.0.so
/usr/lib/libpango-1.0.so /usr/lib/libharfbuzz.so /usr/lib/libatk-1.0.so /usr/lib/libcairo-gobject.so
/usr/lib/libcairo.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libgio-2.0.so /usr/lib/libgobject-2.0.so
/usr/lib/libglib-2.0.so && :
[ +1 ms] /usr/bin/ld: CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o: in function
`fl_register_plugins(_FlPluginRegistry*)':
[ ] /home/francis/AndroidStudioProjects/dspace/linux/flutter/generated_plugin_registrant.cc:14:
undefined reference to `size_plugin_register_with_registrar'
[ +1 ms] clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
[ +4 ms] ninja: build stopped: subcommand failed.
[ +26 ms] Building Linux application... (completed in 26.1s)
[ +1 ms] Exception: Build process failed
[ +2 ms] "flutter run" took 26,807ms.
[ +6 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>
[ +257 ms] ensureAnalyticsSent: 253ms
[ +2 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
Content of generated_plugin_registrant.cc
//
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
#include <size/size_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) size_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "SizePlugin");
size_plugin_register_with_registrar(size_registrar);
}
Content of size_plugin.h
#ifndef FLUTTER_PLUGIN_SIZE_PLUGIN_H_
#define FLUTTER_PLUGIN_SIZE_PLUGIN_H_
#include <flutter_linux/flutter_linux.h>
G_BEGIN_DECLS
#ifdef FLUTTER_PLUGIN_IMPL
#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default")))
#else
#define FLUTTER_PLUGIN_EXPORT
#endif
typedef struct _SizePlugin SizePlugin;
typedef struct {
GObjectClass parent_class;
} SizePluginClass;
FLUTTER_PLUGIN_EXPORT GType size_plugin_get_type();
FLUTTER_PLUGIN_EXPORT void size_plugin_register_with_registrar(
FlPluginRegistrar* registrar);
G_END_DECLS
#endif // FLUTTER_PLUGIN_SIZE_PLUGIN_H_
Content of generated_plugin_registrant.h
//
// Generated file. Do not edit.
//
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_
#include <flutter_linux/flutter_linux.h>
// Registers Flutter plugins.
void fl_register_plugins(FlPluginRegistry* registry);
#endif // GENERATED_PLUGIN_REGISTRANT_
Flutter plugins follow a very specific format, and the tooling requires core elements of that format to exist. That includes the public header file with the correct path, as you have discovered, and also the plugin registration, which is the second issues you have (it sounds like you have restored the declaration, but not the implementation).
If your goal is to build your own FFI library code by piggy-backing on the plugin template, you need to leave those core elements in place. Your registration method doesn't need to do anything, but it must exist because the flutter tool will generate a call to it.
It's likely that in the future there will be tooling support for FFI-specific builds, but until then you need to make your library follow the required elements of the plugin structure.
Please help - getting below error when trying to run:
**Compiler message:
/C:/Users/USER/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flutter_sticky_header-0.3.4/lib/src/widgets/sticky_header_layout_builder.dart:147:16: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
- 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('/C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
context: context);
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1**
when running flutter run -v within terminal I get the following errors:
C:\allflutterprojects\rapidinhotest>flutter run -v
[ +34 ms] executing: [C:\flutter\] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +95 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +1 ms] 0b8abb4724aa590dd0f429683339b1e045a1594d
[ +1 ms] executing: [C:\flutter\] git describe --match v*.*.* --first-parent --long --tags
[ +81 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v1.12.13+hotfix.8-0-g0b8abb472
[ +12 ms] executing: [C:\flutter\] git rev-parse --abbrev-ref --symbolic #{u}
[ +63 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic #{u}
[ ] origin/stable
[ ] executing: [C:\flutter\] git ls-remote --get-url origin
[ +50 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +140 ms] executing: [C:\flutter\] git rev-parse --abbrev-ref HEAD
[ +69 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +185 ms] executing: C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
[ +30 ms] Exit code 0 from: C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
[ ] List of devices attached
emulator-5554 device product:sdk_gphone_x86 model:sdk_gphone_x86 device:generic_x86_arm transport_id:2
[ +21 ms] C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 shell getprop
[ +114 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ +11 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +9 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +97 ms] Found plugin cloud_firestore at C:\Users\USER\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.8.2+3\
[ +20 ms] Found plugin firebase_core at C:\Users\USER\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_core-0.2.5+1\
[ +20 ms] Found plugin google_maps_flutter at C:\Users\USER\AppData\Roaming\Pub\Cache\git\plugins-0a9d0c576a69f9b5d464ad811600e50a7b687911\packages\google_maps_flutter\
[ +26 ms] Found plugin path_provider at C:\Users\USER\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\path_provider-1.5.1\
[ +38 ms] Found plugin sqflite at C:\Users\USER\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\sqflite-1.2.0\
[ +89 ms] Found plugin cloud_firestore at C:\Users\USER\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.8.2+3\
[ +8 ms] Found plugin firebase_core at C:\Users\USER\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\firebase_core-0.2.5+1\
[ +14 ms] Found plugin google_maps_flutter at C:\Users\USER\AppData\Roaming\Pub\Cache\git\plugins-0a9d0c576a69f9b5d464ad811600e50a7b687911\packages\google_maps_flutter\
[ +17 ms] Found plugin path_provider at C:\Users\USER\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\path_provider-1.5.1\
[ +19 ms] Found plugin sqflite at C:\Users\USER\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\sqflite-1.2.0\
[ +82 ms] Generating C:\allflutterprojects\rapidinhotest\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +38 ms] ro.hardware = ranchu
[ +50 ms] Using hardware rendering with device sdk gphone x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
[ +25 ms] Launching lib\main.dart on sdk gphone x86 in debug mode...
[ +17 ms] executing: C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
[ +87 ms] Exit code 0 from: C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
[ +1 ms] --------- beginning of main
03-06 00:29:48.113 E/netmgr ( 2114): Failed to open QEMU pipe 'qemud:network': Invalid argument
[ +14 ms] executing: C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe version
[ +3 ms] executing: C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe -s emulator-5554 logcat -v time -T 03-06 00:29:48.113
[ +88 ms] Android Debug Bridge version 1.0.41
Version 29.0.6-6198805
Installed as C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe
[ +6 ms] executing: C:\Users\USER\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server
[ +90 ms] Building APK
[ +26 ms] [!] Your app isn't using AndroidX.
[ +1 ms] To avoid potential build failures, you can quickly migrate your app by following the steps on .
[ +20 ms] Running Gradle task 'assembleDebug'...
[ +6 ms] gradle.properties already sets `android.enableR8`
[ +15 ms] Using gradle from C:\allflutterprojects\rapidinhotest\android\gradlew.bat.
[ +20 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +177 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ ] openjdk version "1.8.0_212-release"
OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
[ +6 ms] executing: [C:\allflutterprojects\rapidinhotest\android\] C:\allflutterprojects\rapidinhotest\android\gradlew.bat -Pverbose=true
-Ptarget=C:\allflutterprojects\rapidinhotest\lib\main.dart -Ptrack-widget-creation=true -Pfilesystem-scheme=org-dartlang-root -Ptarget-platform=android-x86 assembleDebug
[+5306 ms] :app:compileFlutterBuildDebug
[ +1 ms] [ +82 ms] executing: [C:\flutter\] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +110 ms] [ +141 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +1 ms] [ +2 ms] 0b8abb4724aa590dd0f429683339b1e045a1594d
[ +1 ms] [ ] executing: [C:\flutter\] git describe --match v*.*.* --first-parent --long --tags
[ +80 ms] [ +90 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ +1 ms] [ ] v1.12.13+hotfix.8-0-g0b8abb472
[ +9 ms] [ +15 ms] executing: [C:\flutter\] git rev-parse --abbrev-ref --symbolic #{u}
[ +77 ms] [ +72 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic #{u}
[ ] [ ] origin/stable
[ ] [ ] executing: [C:\flutter\] git ls-remote --get-url origin
[ +78 ms] [ +69 ms] Exit code 0 from: git ls-remote --get-url origin
[ +7 ms] [ ] https://github.com/flutter/flutter.git
[ +135 ms] [ +156 ms] executing: [C:\flutter\] git rev-parse --abbrev-ref HEAD
[ +83 ms] [ +79 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ +1 ms] [ ] stable
[ +53 ms] [ +47 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +1 ms] [ +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +240 ms] [ +254 ms] Initializing file store
[ +53 ms] [ +50 ms] Done initializing file store
[+3210 ms] [+3208 ms] kernel_snapshot: Starting due to {}
[ +55 ms] [ +45 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter -Ddart.developer.causal_async_stacks=true -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts
--track-widget-creation --no-link-platform --packages C:\allflutterprojects\rapidinhotest\.packages --output-dill
C:\allflutterprojects\rapidinhotest\.dart_tool\flutter_build\9e8e8d46a18ccb5b75fbdc16ee578c68\app.dill --depfile
C:\allflutterprojects\rapidinhotest\.dart_tool\flutter_build\9e8e8d46a18ccb5b75fbdc16ee578c68\kernel_snapshot.d package:rapidinho/main.dart
[+10351 ms] [+10361 ms]
[ +3 ms] Compiler message:
[ +1 ms] [ +3 ms] /C:/Users/USER/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flutter_sticky_header-0.3.4/lib/src/widgets/sticky_header_layout_builder.dart:147:16:
Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
[ +6 ms] [ ] - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('/C:/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
[ +2 ms] [ ] context: context);
[ +1 ms] [ ] ^
[+4886 ms] [+4894 ms] Persisting file store
[ +54 ms] [ +57 ms] Done persisting file store
[ +1 ms] [ +2 ms] Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
[ +35 ms] [ +24 ms] "flutter assemble" took 19,035ms.
[ +1 ms] build failed.
[ +4 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
[ +2 ms] #1 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:183:7)
[ +1 ms] <asynchronous suspension>
[ +1 ms] #2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:615:18)
[ +1 ms] <asynchronous suspension>
[ +1 ms] #3 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:515:33)
[ +3 ms] <asynchronous suspension>
[ +5 ms] #4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
[ +1 ms] #5 _rootRun (dart:async/zone.dart:1126:13)
[ +1 ms] #6 _CustomZone.run (dart:async/zone.dart:1023:19)
[ +1 ms] #7 _runZoned (dart:async/zone.dart:1518:10)
[ +1 ms] #8 runZoned (dart:async/zone.dart:1465:12)
[ +1 ms] #9 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ +1 ms] #10 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
[ +1 ms] #11 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
[ +1 ms] #12 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)
[ +1 ms] <asynchronous suspension>
[ +2 ms] #13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
[ +1 ms] #14 _rootRun (dart:async/zone.dart:1126:13)
[ +1 ms] #15 _CustomZone.run (dart:async/zone.dart:1023:19)
[ +1 ms] #16 _runZoned (dart:async/zone.dart:1518:10)
[ ] #17 runZoned (dart:async/zone.dart:1465:12)
[ +1 ms] #18 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ +1 ms] #19 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
[ ] #20 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
[ +1 ms] #21 new Future.sync (dart:async/future.dart:224:31)
[ +2 ms] #22 CommandRunner.run (package:args/command_runner.dart:112:14)
[ +1 ms] #23 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
[ +2 ms] #24 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
[ +2 ms] #25 _rootRun (dart:async/zone.dart:1126:13)
[ +1 ms] #26 _CustomZone.run (dart:async/zone.dart:1023:19)
[ ] #27 _runZoned (dart:async/zone.dart:1518:10)
[ ] #28 runZoned (dart:async/zone.dart:1502:12)
[ +1 ms] #29 run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
[ +1 ms] <asynchronous suspension>
[ +1 ms] #30 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
[ +1 ms] #31 _rootRun (dart:async/zone.dart:1126:13)
[ +1 ms] #32 _CustomZone.run (dart:async/zone.dart:1023:19)
[ +1 ms] #33 _runZoned (dart:async/zone.dart:1518:10)
[ +5 ms] #34 runZoned (dart:async/zone.dart:1465:12)
[ +2 ms] #35 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ +1 ms] #36 runInContext (package:flutter_tools/src/context_runner.dart:64:24)
[ +1 ms] #37 run (package:flutter_tools/runner.dart:50:10)
[ +1 ms] #38 main (package:flutter_tools/executable.dart:65:9)
[ +1 ms] #39 main (file:///C:/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
[ +1 ms] #40 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32)
[ +1 ms] #41 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
[ +46 ms] :app:compileFlutterBuildDebug FAILED
[ +4 ms] FAILURE: Build failed with an exception.
[ +1 ms] * Where:
[ +1 ms] Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780
[ +1 ms] * What went wrong:
[ +1 ms] Execution failed for task ':app:compileFlutterBuildDebug'.
[ +1 ms] > Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
[ +1 ms] * Try:
[ +1 ms] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[ +1 ms] * Get more help at https://help.gradle.org
[ +1 ms] BUILD FAILED in 24s
[ +1 ms] 1 actionable task: 1 executed
[ +600 ms] Running Gradle task 'assembleDebug'... (completed in 25.8s)
[ +17 ms] "flutter run" took 27,236ms.
Gradle task assembleDebug failed with exit code 1
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 buildGradleApp (package:flutter_tools/src/android/gradle.dart:387:7)
#2 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)
#3 _rootRunUnary (dart:async/zone.dart:1134:38)
#4 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)
#11 _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart)
#12 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)
#13 _rootRunUnary (dart:async/zone.dart:1134:38)
#14 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#15 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#16 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#17 Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#18 Future._completeWithValue (dart:async/future_impl.dart:524:5)
#19 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:554:7)
#20 _rootRun (dart:async/zone.dart:1126:13)
#21 _CustomZone.run (dart:async/zone.dart:1023:19)
#22 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#23 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#24 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#26 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#27 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)
I have updated to the latest flutter update. When I want to start the project, it returns an error. The project depends on several repositories and I don't know if that is why. I have tried multiple solutions but they do not solve the error. Hope someone can help me. thanks.
I updated flutter stable to the latest version:
Upgrading Flutter from /Users/domingo/flutter...
Updating cf37c2cd0..27321ebba
24 files changed, 651 insertions(+), 218 deletions(-)
Flutter is already up to date on channel stable
Flutter 1.12.13+hotfix.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 27321ebbad (2 days ago) • 2019-12-10 18:15:01 -0800
Engine • revision 2994f7e1e6
Tools • Dart 2.7.0
Debug Terminal Complete:
https://pastebin.com/2PwktnGT
/Users/domingo/StudioProjects/faycancrm/.dart_tool/flutter_build/e61e4110ac7bd4b7b74855b2fc423272/app.di
ll --depfile
/Users/domingo/StudioProjects/faycancrm/.dart_tool/flutter_build/e61e4110ac7bd4b7b74855b2fc423272/kernel
_snapshot.d package:faycancrm/main.dart
[+2401 ms] [+2478 ms]
[ +1 ms] Compiler message:
[ ] [ +3 ms]
../../flutter/.pub-cache/hosted/pub.dartlang.org/zefyr-0.8.0/lib/src/widgets/input.dart:11:7: Error: The
non-abstract class 'InputConnectionController' is missing implementations for these members:
[ ] [ ] - TextInputClient.connectionClosed
[ ] [ ] Try to either
[ ] [ ] - provide an implementation,
[ ] [ ] - inherit an implementation from a superclass or mixin,
[ ] [ ] - mark the class as abstract, or
[ ] [ ] - provide a 'noSuchMethod' implementation.
[ ] [ ] class InputConnectionController implements TextInputClient {
[ ] [ ] ^^^^^^^^^^^^^^^^^^^^^^^^^
[ ] [ ] ../../flutter/packages/flutter/lib/src/services/text_input.dart:661:8: Context:
'TextInputClient.connectionClosed' is defined here.
[ ] [ ] void connectionClosed();
[ ] [ ] ^^^^^^^^^^^^^^^^
[ +391 ms] [ +402 ms]
../../flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.3/lib/src/cached_network_image
_provider.dart:42:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments
than those of overridden method 'ImageProvider.load'.
[ ] [ ] ImageStreamCompleter load(CachedNetworkImageProvider key) {
[ ] [ ] ^
[ ] [ ] ../../flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24:
Context: This is the overridden method ('load').
[ ] [ ] ImageStreamCompleter load(T key, DecoderCallback decode);
[ ] [ ] ^
[+8796 ms] [+8774 ms] Persisting file store
[ ] [ +19 ms] Done persisting file store
[ ] [ +1 ms] Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
[ +97 ms] [ +11 ms] "flutter assemble" took 13.771ms.
[ ] build failed.
[ ] #0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
[ ] #1 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:183:7)
[ ] <asynchronous suspension>
[ ] #2 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:615:18)
[ ] <asynchronous suspension>
[ ] #3 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:515:33)
[ +1 ms] <asynchronous suspension>
[ ] #4 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:146:29)
[ ] #5 _rootRun (dart:async/zone.dart:1126:13)
[ ] #6 _CustomZone.run (dart:async/zone.dart:1023:19)
[ ] #7 _runZoned (dart:async/zone.dart:1518:10)
[ ] #8 runZoned (dart:async/zone.dart:1465:12)
[ ] #9 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ ] #10 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
[ ] #11 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
[ ] #12 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)
[ +16 ms] <asynchronous suspension>
[ ] #13 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:146:29)
[ ] #14 _rootRun (dart:async/zone.dart:1126:13)
[ ] #15 _CustomZone.run (dart:async/zone.dart:1023:19)
[ +1 ms] #16 _runZoned (dart:async/zone.dart:1518:10)
[ ] #17 runZoned (dart:async/zone.dart:1465:12)
[ ] #18 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ ] #19 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
[ ] #20 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
[ ] #21 new Future.sync (dart:async/future.dart:224:31)
[ ] #22 CommandRunner.run (package:args/command_runner.dart:112:14)
[ ] #23 FlutterCommandRunner.run
(package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
[ ] #24 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
[ ] #25 _rootRun (dart:async/zone.dart:1126:13)
[ ] #26 _CustomZone.run (dart:async/zone.dart:1023:19)
[ ] #27 _runZoned (dart:async/zone.dart:1518:10)
[ ] #28 runZoned (dart:async/zone.dart:1502:12)
[ ] #29 run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
[ ] <asynchronous suspension>
[ ] #30 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:146:29)
[ ] #31 _rootRun (dart:async/zone.dart:1126:13)
[ ] #32 _CustomZone.run (dart:async/zone.dart:1023:19)
[ ] #33 _runZoned (dart:async/zone.dart:1518:10)
[ ] #34 runZoned (dart:async/zone.dart:1465:12)
[ ] #35 AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
[ ] #36 runInContext (package:flutter_tools/src/context_runner.dart:64:24)
[ ] #37 run (package:flutter_tools/runner.dart:50:10)
[ ] #38 main (package:flutter_tools/executable.dart:65:9)
[ ] #39 main
(file:///Users/domingo/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
[ +3 ms] #40 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32)
[ ] #41 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
[ ] FAILURE: Build failed with an exception.
[ ] * Where:
[ ] Script '/Users/domingo/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780
[ ] * What went wrong:
[ ] Execution failed for task ':app:compileFlutterBuildDebug'.
[ ] > Process 'command '/Users/domingo/flutter/bin/flutter'' finished with non-zero exit value 1
[ +3 ms] * Try:
[ ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get
more log output. Run with --scan to get full insights.
[ +5 ms] * Get more help at https://help.gradle.org
[ ] BUILD FAILED in 17s
[ ] > Task :app:compileFlutterBuildDebug FAILED
[ ] 1 actionable task: 1 executed
[ +471 ms] Running Gradle task 'assembleDebug'... (completed in 19,2s)
[ +3 ms] The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to
try using
Jetfier to solve the incompatibility.
[ +15 ms] ✏️ Creating `android/settings_aar.gradle`...
[ +4 ms] ✏️ Creating `android/settings_aar.gradle`... (completed in 2ms)
[ ] ✓ `android/settings_aar.gradle` created successfully.
[ +3 ms] Building plugin audioplayers...
[ +9 ms] Running Gradle task 'assembleAarRelease'...
[ +2 ms] set `android.enableR8=true` in gradle.properties
[ +26 ms] Using gradle from
It looks like the interface for TextInputClient has changed and Zefyr hasn't been updated to fully implement the new methods (for example, it looks like it's missing an implementation for connectionClosed, but the Zefyr source doesn't have an implementation).
Unfortunately, there's not much you can do about this other than:
File an issue against the Zefyr repo on GitHub and hope the author gets around to publishing a fix
Fork Zefyr and depend on a local copy on your machine after you've implemented the missing methods
Downgrade your Flutter version to the last version which Zefyr works on
Find another plugin which provides similar functionality
i made an application with flutter and runned more than 10 times before last edits and the last edits are nothing added new but somethings Iterative(no thing is new) in release mode and produce application's without errors
the problem is not giving any fault or error even when run
flutter run -v
what is the problem with flutter about all ?
i have tried
flutter clean
without any good results
it only gives:
Running Gradle task 'assembleRelease'...
Finished with error: Gradle task assembleRelease failed with exit code 1
this is the flutter run -v
log:(last of it)
+file:///C:/flutter/packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_notification.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/editable_text.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/fade_in_image.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/focus_manager.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/focus_scope.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/focus_traversal.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/form.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/framework.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/gesture_detector.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/grid_paper.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/heroes.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/icon.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/icon_data.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/icon_theme.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/icon_theme_data.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/image.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/image_icon.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/implicit_animations.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/inherited_model.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/inherited_notifier.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/inherited_theme.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/layout_builder.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/localizations.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/media_query.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/modal_barrier.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/navigation_toolbar.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/navigator.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/nested_scroll_view.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/notification_listener.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/orientation_builder.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/overlay.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/overscroll_indicator.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/page_storage.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/page_view.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/pages.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/performance_overlay.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/placeholder.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/platform_view.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/preferred_size.dart
[ +1 ms] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/primary_scroll_controller.dart
[ +3 ms] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/raw_keyboard_listener.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/route_notification_messages.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/routes.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/safe_area.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_activity.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_configuration.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_context.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_controller.dart
[ +1 ms] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_metrics.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_physics.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_position.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_position_with_single_context.da
rt
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_simulation.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scroll_view.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scrollable.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/scrollbar.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/semantics_debugger.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/shortcuts.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/single_child_scroll_view.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/size_changed_layout_notifier.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/sliver.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/sliver_layout_builder.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/sliver_persistent_header.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/sliver_prototype_extent_list.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/spacer.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/status_transitions.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/table.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/text.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/text_selection.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/texture.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/title.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/transitions.dart
[ +1 ms] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/tween_animation_builder.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/unique_widget.dart
[ ] ->
+file:///C:/flutter/packages/flutter/lib/src/widgets/value_listenable_builder.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/viewport.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/visibility.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/widget_inspector.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/widget_span.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/src/widgets/will_pop_scope.dart
[ ] -> +file:///C:/flutter/packages/flutter/lib/widgets.dart
[ ] -> 23afc489-318a-4a2d-907e-ac56ab8f5af7 build\app.dill 0
[ ] Updating files
[+1426 ms] DevFS: Sync finished
[ +2 ms] Syncing files to device D2502... (completed in 11,349ms, longer than expected)
[ +1 ms] Synced 1.9MB.
[ +1 ms] Sending to VM service: _flutter.listViews({})
[ +6 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id:
_flutterView/0xb857af90, isolate: {type: #Isolate, fixedId: true, id:
isolates/4097145620960107, name: main.dart$main-4097145620960107, number:
4097145620960107}}]}
[ +1 ms] <- accept
[ ] Connected to _flutterView/0xb857af90.
[ +6 ms] � To hot reload changes while running, press "r". To hot restart (and rebuild
state),
press "R".
[ +63 ms] An Observatory debugger and profiler on D2502 is available at:
http://127.0.0.1:56602/ug-EV7uiGhQ=/
[ +1 ms] For a more detailed help message, press "h". To detach, press "d"; to quit,
press "q".
EDIT::
when Running flutter run --release:
C:\FlutterApps\PrintTouch>flutter run --release
Initializing gradle... 2.0s
Resolving dependencies... 7.8s
Launching lib\main.dart on D2502 in release mode...
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 79.8s
Gradle task assembleRelease failed with exit code 1
Edit 2: when running flutter build apk -v
gradle task assembleRelease failed with exit code 1
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:765:5)
<asynchronous suspension>
#2 buildGradleProject (package:flutter_tools/src/android/gradle.dart:505:14)
<asynchronous suspension>
#3 _AndroidBuilderImpl.buildApk (package:flutter_tools/src/android/android_builder.dart:101:11)
<asynchronous suspension>
#4 BuildApkCommand.runCommand (package:flutter_tools/src/commands/build_apk.dart:102:26)
<asynchronous suspension>
#5 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
#6 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#7 _rootRunUnary (dart:async/zone.dart:1132:38)
#8 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#9 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#10 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#11 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#12 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#13 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#14 _rootRun (dart:async/zone.dart:1124:13)
#15 _CustomZone.run (dart:async/zone.dart:1021:19)
#16 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#17 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#18 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#19 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#20 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#21 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
EDIT#3:
try running flutter run --realease -v ::
Gradle task assembleRelease failed with exit code 1
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:765:5)
<asynchronous suspension>
#2 buildGradleProject (package:flutter_tools/src/android/gradle.dart:505:14)
<asynchronous suspension>
#3 _AndroidBuilderImpl.buildApk (package:flutter_tools/src/android/android_builder.dart:101:11)
<asynchronous suspension>
#4 AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:485:28)
<asynchronous suspension>
#5 FlutterDevice.runCold (package:flutter_tools/src/resident_runner.dart:438:46)
<asynchronous suspension>
#6 ColdRunner.run (package:flutter_tools/src/run_cold.dart:63:39)
<asynchronous suspension>
#7 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:460:37)
<asynchronous suspension>
#8 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:490:18)
#9 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#10 _rootRunUnary (dart:async/zone.dart:1132:38)
#11 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#12 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#13 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#14 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#15 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#16 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#17 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#18 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#19 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#20 _rootRunUnary (dart:async/zone.dart:1132:38)
#21 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#22 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#23 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#24 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#25 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#26 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#27 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#28 AndroidDevice.isLocalEmulator (package:flutter_tools/src/android/android_device.dart)
#29 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#30 _rootRunUnary (dart:async/zone.dart:1132:38)
#31 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#32 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#33 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#34 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#35 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#36 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#37 _rootRun (dart:async/zone.dart:1124:13)
#38 _CustomZone.run (dart:async/zone.dart:1021:19)
#39 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#40 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#41 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#42 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#43 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#44 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)