是否有人将Uint8Array传递给React Native中本机模块我有错误来自JS调用格式错误

eqoofvh9  于 2022-11-25  发布在  React
关注(0)|答案(1)|浏览(175)

I try to pass ByteArray to Java Wrapper of my native module, but get error:
Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.
[[20,20,20,20,20,20,20,20,20,20,4,36],[17,9,2,19,17,9,2,19,17,9,0,0],[[1856,3641,{"iterations":1,"toValue":1,"frames":[0,0.008888888888888889,0.035555555555555556,0.08000000000000002,0.14222222222222222,0.2222222222222222,0.32000000000000006,0.4355555555555556,0.5644444444444444,0.6799999999999999,0.7777777777777777,0.8577777777777778,0.92,0.9644444444444444,0.9911111111111112,1],"type":"frames"},56817],[],[3730,2445],[],[1857,3636,{"iterations":1,"toValue":1,"frames":[0,0.008888888888888889,0.035555555555555556,0.08000000000000002,0.14222222222222222,0.2222222222222222,0.32000000000000006,0.4355555555555556,0.5644444444444444,0.6799999999999999,0.7777777777777777,0.8577777777777778,0.92,0.9644444444444444,0.9911111111111112,1],"type":"frames"},56825],[],[3732,2453],[],[1858,3644,{"iterations":1,"toValue":1,"frames":[0,0.008888888888888889,0.035555555555555556,0.08000000000000002,0.14222222222222222,0.2222222222222222,0.32000000000000006,0.4355555555555556,0.5644444444444444,0.6799999999999999,0.7777777777777777,0.8577777777777778,0.92,0.9644444444444444,0.9911111111111112,1],"type":"frames"},56833],[],[814,100,1668782523552,false]],28408]
Try to pass only Int to Java wrapper and all is worked, but if i pass Uint8Array have this error.

ulmd4ohb

ulmd4ohb1#

使用ReadableArray传递数据,使用WritableArray传递回Javascript。
如需支援类型的清单,请参阅参数类型。

相关问题