当前位置:网站首页>【解决方案】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边栏推荐
- 会话推荐中的价格偏好和兴趣偏好共同建模-论文泛读
- 吴恩达老师机器学习课程笔记 00 写在前面
- C语言内存-栈与堆使用
- 【冷冻电镜|论文阅读】A feature-guided, focused 3D signal permutation method for subtomogram averaging
- SQL developer graphical window to create database (tablespace and user)
- 【讲座笔记】如何在稀烂的数据中做深度学习?
- ping 原理
- Thinkphp5 frequently asked questions
- The core of openresty and cosocket
- 损失函数——交叉熵损失函数
猜你喜欢

5G服务化接口和参考点

Navicat for Oracle Cannot create oci environment

CNN convolutional neural network

损失函数——交叉熵损失函数

CNN-卷积神经网络

【冷冻电镜|论文阅读】子断层平均 M 软件解读:Multi-particle cryo-EM refinement with M

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

NeuralCF-神经协同过滤网络

Loss function -- cross entropy loss function

Hongke share | bring you a comprehensive understanding of "can bus error" (I) -- can bus error and error frame
随机推荐
【冷冻电镜】RELION4.0 pipeline命令总结(自用)
MySQL 事物四种隔离级别分析
Shell脚本-全局变量、局部变量、环境变量
【技能积累】写邮件时的常用表达
Introduction to OSPF theory
vmstat 内存消耗查询
关于SQL Server语句入门级应用阶段性学习——找工作必备(一)
AbstractQueuedSynchronizer(AQS)之 ReentrantLock 源码浅读
如何优雅的写 Controller 层代码?
'function vtable for error: undefined reference to ... ' 问题的原因及解决方法
STP spanning tree principle and example of election rules
王树尧老师运筹学课程笔记 04 线性代数基础
Neuralcf neural collaborative filtering network
【经验】通过跳板机远程连接内网服务器的相关配置
量子机器学习中的安全性问题
Hongke share | let you have a comprehensive understanding of "can bus error" (III) -- can node status and error counter
Condition 条件对象源码浅读
【技能积累】presentation实用技巧积累,常用句式
IPv6 representation and configuration cases
The core of openresty and cosocket