Dec*_*coy 5 android renderscript android-support-library
将RenderScript与支持库一起使用时,我在Motorola iRazr(Android 4.1.2)上出现此错误
Error loading RS jni library: java.lang.UnsatisfiedLinkError: Couldn't load RSSupport: findLibrary returned null
Run Code Online (Sandbox Code Playgroud)
三星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);
Run Code Online (Sandbox Code Playgroud)
我使用的支持库jar是
build-tools/19.0.1/renderscript/lib/renderscript-v8.jar
Run Code Online (Sandbox Code Playgroud)
任何帮助深表感谢.
编辑:
我将这些文件复制到libs文件夹中,并验证了so文件是否在设备上的data/data/lib文件夹中.
librsjni.so和 libRSSupport.so存在于设备上...
编辑:
更详细的错误:
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'...
Run Code Online (Sandbox Code Playgroud)
您不必使用库build-tools/19.0.1/renderscript/lib/renderscript-v8.jar(删除它),正如Google团队在此处所说,您只需在project.properties文件中包含以下行:
renderscript.target=18
renderscript.support.mode=true
sdk.buildtools=19.0.3
Run Code Online (Sandbox Code Playgroud)
我希望这能帮到您.
| 归档时间: |
|
| 查看次数: |
6242 次 |
| 最近记录: |