我想创建一个 Titanium 模块,因此我有一个扩展 KrollModule 及其方法的类:
@Kroll.method
public void example()
{
Activity activity = this.getActivity();
String filesDir = activity.getFilesDir().getAbsolutePath();
}
当我尝试以这种方式在我的应用程序中使用此模块时:
var w = require('com.module3');
w.example();
我有以下错误:
[ERROR][TiApplication( 286)] (KrollRuntimeThread) [30,975] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: Library stlport_shared not found; Titanium 2.1.0,2012/06/28 12:16,6e3cab6
[ERROR][TiApplication( 286)] java.lang.UnsatisfiedLinkError: Library stlport_shared not found
[ERROR][TiApplication( 286)] at java.lang.Runtime.loadLibrary(Runtime.java:461)
[ERROR][TiApplication( 286)] at java.lang.System.loadLibrary(System.java:557)
[ERROR][TiApplication( 286)] at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:59)
[ERROR][TiApplication( 286)] at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:163)
[ERROR][TiApplication( 286)] at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:101)
我搜索 stlport_shared,它位于 C:\Users\Maria\AppData\Roaming\Titanium\mobilesdk\win32\2.1.0.GA\android\native\libs\x86 中。有人可以帮我理解这个问题吗?