When using RenderScript with the support libraries I get this error on Motorola iRazr (Android 4.1.2)
Error loading RS jni library: java.lang.UnsatisfiedLinkError: Couldn't load RSSupport: findLibrary returned null
Everything works fine on Samsung Galaxy S3.
Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap);
RenderScript rs = RenderScript.create(ctx);
ScriptIntrinsicBlur theIntrinsic = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs));
Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap);
Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap);
theIntrinsic.setRadius(BLUR_RADIUS);
theIntrinsic.setInput(tmpIn);
theIntrinsic.forEach(tmpOut);
tmpOut.copyTo(outputBitmap);
The support library jar I use is
build-tools/19.0.1/renderscript/lib/renderscript-v8.jar
Any help is much appreciated.
EDIT:
I copied the so files in the libs folder and verified that the so files are in the data/data/lib folder on the device.
librsjni.so and libRSSupport.so exists on the device ...
EDIT:
More detailed error:
02-26 16:17:42.311: D/dalvikvm(16985): Trying to load lib /data/data/de.proximity.hero/lib/libRSSupport.so 0x42616b70
02-26 16:17:42.321: D/dalvikvm(16985): Added shared lib /data/data/de.proximity.hero/lib/libRSSupport.so 0x42616b70
02-26 16:17:42.321: D/dalvikvm(16985): No JNI_OnLoad found in /data/data/de.proximity.hero/lib/libRSSupport.so 0x42616b70, skipping init
02-26 16:17:42.321: D/dalvikvm(16985): Trying to load lib /data/data/de.proximity.hero/lib/librsjni.so 0x42616b70
02-26 16:17:42.351: E/RenderScript_jni(16985): Error loading RS jni library: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]: 141 cannot locate '__strlen_chk'...
You don't have to use the library build-tools/19.0.1/renderscript/lib/renderscript-v8.jar
(delete it), as google team say here, you only have to include in your project.properties
file this lines:
renderscript.target=18
renderscript.support.mode=true
sdk.buildtools=19.0.3
I hope this will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With