I want to create a Titanium module, so I have a class that extends KrollModule and its method:
@Kroll.method public void example() { Activity activity = this.getActivity(); String filesDir = activity.getFilesDir().getAbsolutePath(); }
When I try to use this module in my application this way:
var w = require('com.module3'); w.example();
I have the following error:
[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)
I am looking for stlport_shared and is present in C: \ Users \ Maria \ AppData \ Roaming \ Titanium \ mobilesdk \ win32 \ 2.1.0.GA \ android \ native \ libs \ x86. Can someone help me understand the problem?
source share