【问题标题】:Passing enum to android native module将枚举传递给android本机模块
【发布时间】:2015-04-30 18:23:38
【问题描述】:

我将 enum 传递给 android 本机模块,但在运行时出现此错误:

[错误] : JNIUtil: !!!无法转换未知的 Java 对象类 'miy.Enums$Status' 到 Js 值!!!

[INFO] : libc: 致命信号 11 (SIGSEGV) 在 0x00000000 (code=1),线程 6614 (KrollRuntimeThr)

上面的错误是在本地模块中的函数被调用之前显示的,所以看起来问题出在JNI层。

那么如何将enum 传递给本机模块?

【问题讨论】:

    标签: titanium-mobile titanium-alloy titanium-modules titanium-android


    【解决方案1】:

    【讨论】:

    • 所以我不能将枚举直接传递给本机模块吗?因为我什至在调用本机模块中的函数之前就收到上述错误所以我该如何使用@Kroll.constant
    • 您只能从本机模块传递和获取 such types。是你的模块吗?
    猜你喜欢
    • 2011-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多