当前位置:网站首页>[solution] error: lib/bridge_ generated. dart:837:9: Error: The parameter ‘ptr‘ of the method ‘FlutterRustB
[solution] error: lib/bridge_ generated. dart:837:9: Error: The parameter ‘ptr‘ of the method ‘FlutterRustB
2022-07-29 07:06:00 【Good at learning】
【 Report errors 】
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【 Solution 】
$ 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边栏推荐
- Student status management system based on C language design
- 剑指 Offer II 115:重建序列
- Flink实时仓库-DWD层(流量域)模板代码
- Flink real-time warehouse DWD layer (Kafka associated with MySQL lookup join) template code
- Simulation volume leetcode [general] 150. evaluation of inverse Polish expression
- 分享一些你代码更好的小建议,流畅编码提搞效率
- Analog volume leetcode [normal] 093. Restore IP address
- Improved pillar with fine grained feature for 3D object detection paper notes
- 没那么简单的单例模式
- Teacher wangshuyao's notes on operations research 03 KKT theorem
猜你喜欢
随机推荐
Teacher Wu Enda's machine learning course notes 03 review of linear algebra
【C语言刷LeetCode】1054. 距离相等的条形码(M)
Thread - thread safety - thread optimization
Share some tips for better code, smooth coding and improve efficiency
聊天机器人有何用处?有何类型?看完这些就明白了!
Improved pillar with fine grained feature for 3D object detection paper notes
The core of openresty and cosocket
Teacher Wang Shuyao's notes on operations research 09 linear programming and simplex method (Application of simplex table)
Relative date used by filter in salesforce
Pod基本介绍
【Redis】Redis开发规范与注意事项
resize2fs: 超级块中的幻数有错(Bad magic number in super-block )
城市花样精~侬好!DESIGN#可视化电台即将开播
Excerpts from good essays
太空射击第17课: Game Over (結束)
MVFuseNet:Improving End-to-End Object Detection and Motion Forecasting through Multi-View Fusion of
Unity免费元素特效推荐
Junda technology | applicable to "riyueyuan" brand ups wechat cloud monitoring card
Teacher wangshuyao's notes on operations research 01 guidance and introduction
模拟卷Leetcode【普通】081. 搜索旋转排序数组 II








