当前位置:网站首页>【解决方案】ERROR: lib/bridge_generated.dart:837:9: Error: The parameter ‘ptr‘ of the method ‘FlutterRustB
【解决方案】ERROR: lib/bridge_generated.dart:837:9: Error: The parameter ‘ptr‘ of the method ‘FlutterRustB
2022-07-29 05:31:00 【爱学习的佳】
【报错】
Launching lib/main.dart on Linux in debug mode...
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
ERROR: lib/bridge_generated.dart:837:9: Error: The parameter 'ptr' of the method 'FlutterRustBridgeExampleWire.store_dart_post_cobject' has type 'int', which does not match the corresponding type, 'Pointer<NativeFunction<Bool Function(Int64, Pointer)>>', in the overridden method, 'FlutterRustBridgeWireBase.store_dart_post_cobject'.
ERROR: - 'Pointer' is from 'dart:ffi'.
ERROR: - 'NativeFunction' is from 'dart:ffi'.
ERROR: - 'Bool' is from 'dart:ffi'.
ERROR: - 'Int64' is from 'dart:ffi'.
ERROR: - 'Void' is from 'dart:ffi'.
ERROR: Change to a supertype of 'Pointer<NativeFunction<Bool Function(Int64, Pointer)>>', or, for a covariant parameter, a subtype.
ERROR: int ptr,
ERROR: ^
ERROR: ../../frb_dart/lib/src/basic.dart:153:8: Context: This is the overridden method ('store_dart_post_cobject').
ERROR: void store_dart_post_cobject(
ERROR: ^
Building Linux application...
Exception: Build process failed【解决方案】
$ export REPO_DIR=$PWD
$ cd /
$ flutter_rust_bridge_codegen \
--rust-input $REPO_DIR/rust/src/api.rs \
--dart-output $REPO_DIR/lib/bridge_generated.dart \
--c-output $REPO_DIR/ios/Classes/bridge_generated.h
[2021-10-22T14:39:33Z INFO flutter_rust_bridge_codegen] Picked config: Opts { rust_input_path: "/home/consulting/Documents/native_add/rust/src/api.rs", dart_output_path: "/home/consulting/Documents/native_add/lib/bridge_generated.dart", c_output_path: "/home/consulting/Documents/native_add/ios/Classes/bridge_generated.h", rust_crate_dir: "/home/consulting/Documents/native_add/rust", rust_output_path: "/home/consulting/Documents/native_add/rust/src/bridge_generated.rs", class_name: "NativeAdd", dart_format_line_length: 80, skip_add_mod_to_lib: false }
[2021-10-22T14:39:33Z INFO flutter_rust_bridge_codegen] Phase: Parse source code to AST
[2021-10-22T14:39:33Z INFO flutter_rust_bridge_codegen] Phase: Parse AST to IR
[2021-10-22T14:39:33Z INFO flutter_rust_bridge_codegen] Phase: Transform IR
[2021-10-22T14:39:33Z INFO flutter_rust_bridge_codegen] Phase: Generate Rust code
[2021-10-22T14:39:33Z INFO flutter_rust_bridge_codegen] Phase: Generate Dart code
[2021-10-22T14:39:33Z INFO flutter_rust_bridge_codegen] Phase: Other things
[2021-10-22T14:39:34Z INFO flutter_rust_bridge_codegen] Success! Now go and use it :)
$ cd $REPO_DIR边栏推荐
- 没那么简单的单例模式
- Mutual conversion between Base64 and file
- Hongke automation SoftPLC | Hongke kPa modk operation environment and construction steps (3) -- modk routine test
- 偏向锁、轻量级锁测试工具类级相关命令
- Hongke share | bring you a comprehensive understanding of "can bus error" (II) -- can error types
- 王树尧老师运筹学课程笔记 05 线性规划与单纯形法(概念、建模、标准型)
- Case supplement, ATM
- Let the computer run only one program setting
- 5G服务化接口和参考点
- The latest pycharm2018 cracking tutorial
猜你喜欢

分享一些你代码更好的小建议,流畅编码提搞效率

NeuralCF-神经协同过滤网络

Hongke will share the EtherCAT demo for you and teach you how to quickly transition from other protocols to EtherCAT industrial bus

Hongke share | let you have a comprehensive understanding of "can bus error" (III) -- can node status and error counter

Loss function -- cross entropy loss function

JMM memory model concept

apisix健康检查测试

【冷冻电镜】RELION4.0之subtomogram对位功能源码分析(自用)

CNN-卷积神经网络

Recurrent neural network RNN
随机推荐
【冷冻电镜】RELION4.0之subtomogram对位功能源码分析(自用)
Neuralcf neural collaborative filtering network
Hongke automation SoftPLC | Hongke kPa modk operation environment and construction steps (2) -- modk operation environment construction
N2 interface of 5g control plane protocol
Case supplement, ATM
NLP-分词
Recurrent neural network RNN
【CryoEM】FSC, Fourier Shell Correlation简介
How to use SFTP command to access SFTP server on the development board
Relationship between subnet number, host number and subnet mask
CNAME记录和A记录的区别
王树尧老师运筹学课程笔记 02 高等数学基础
【备忘】关于ssh为什么会失败的原因总结?下次记得来找。
解决文件大导致磁盘满的问题
【经验】通过跳板机远程连接内网服务器的相关配置
CNN-卷积神经网络
【冷冻电镜入门】加州理工公开课课程笔记 Part 3: Image Formation
Shallow reading of reentrantlock source code of abstractqueuedsynchronizer (AQS)
Understanding of access, hybrid and trunk modes
有用网站