错误加载RS JNI库:的UnsatisfiedLinkError:无法加载RSSupport:findLibrary返回null [英] Error loading RS jni library: UnsatisfiedLinkError: Couldn't load RSSupport: findLibrary returned null

查看:3359
本文介绍了错误加载RS JNI库:的UnsatisfiedLinkError:无法加载RSSupport:findLibrary返回null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用RenderScript与支持库我得到这个错误摩托罗拉iRazr(安卓4.1.2)

 错误加载RS JNI库:java.lang.UnsatisfiedLinkError中:无法加载RSSupport:findLibrary返回null
 

一切工作正常,在三星Galaxy S3。

 位图outputBitmap = Bitmap.createBitmap(inputBitmap);

        RenderScript RS = RenderScript.create(CTX);

        ScriptIntrinsicBlur theIntrinsic = ScriptIntrinsicBlur.create(RS,Element.U8_4(RS));

        分配tmpIn = Allocation.createFromBitmap(RS,inputBitmap);
        分配tmpOut = Allocation.createFromBitmap(RS,outputBitmap);

        theIntrinsic.setRadius(BLUR_RADIUS);
        theIntrinsic.setInput(tmpIn);
        theIntrinsic.forEach(tmpOut);

        tmpOut.copyTo(outputBitmap);
 

支持库罐子我用的是

 集结工具/ 19.0.1 / renderscript / lib目录/ renderscript,v8.jar
 

任何帮助是非常AP preciated。

编辑:

我复制了这样的文件在libs文件夹,并验证了这样的文件是在数据/数据​​/ lib中的设备上的文件夹中。

librsjni.so 并   libRSSupport.so 设备上存在...

编辑:

更详细的错误:

  02-26 16:17:42.311:D / dalvikvm(16985):试图加载LIB /data/data/de.proximity.hero/lib/libRSSupport.so 0x42616b70
  02-26 16:17:42.321:D / dalvikvm(16985):新增LIB /data/data/de.proximity.hero/lib/libRSSupport.so 0x42616b70共享
  02-26 16:17:42.321:D / dalvikvm(16985):没有JNI_OnLoad在/data/data/de.proximity.hero/lib/libRSSupport.so 0x42616b70发现,跳绳的init
  02-26 16:17:42.321:D / dalvikvm(16985):试图加载LIB /data/data/de.proximity.hero/lib/librsjni.so 0x42616b70
  02-26 16:17:42.351:E / RenderScript_jni(16985):错误加载RS JNI库:java.lang.UnsatisfiedLinkError中:无法加载库:reloc_library [1306] 141找不到__strlen_chk...
 

解决方案

据蒂姆·穆雷这将在下一版本的工具版本(可能是19.1.1)(负责为Android renderscript支持的家伙)。

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'...

解决方案

According to Tim Murray (the guy responsible for Android renderscript support) this will be fixed in the next build tools version (probably 19.1.1).

这篇关于错误加载RS JNI库:的UnsatisfiedLinkError:无法加载RSSupport:findLibrary返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆