Enable x86 libs in production build Titanium appOn 29 September 2013 by admin
In Titanium studio when we build an apk for production, it doesn’t include x86 libs which cause this exception occur on users device, and the app force close immediately after launch:
KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared: findLibrary returned null;
There’s a line of code in Titanium build script build.py that disable it in production settings, which the reason is unknown (last time it was because there are not many x86 devices out there, but it’s different now).
To enable x86 libs in production, comment out this line of code from build.py (mobilesdk/<os>/<version>.GA/android/build.py)
for abi in self.abis: lib_source_dir = os.path.join(sdk_native_libs, abi) lib_dest_dir = 'lib/%s/' % abi # if abi == 'x86' and ((not os.path.exists(lib_source_dir)) or self.deploy_type == 'production'): # # x86 only in non-production builds for now. # continue