1

I'm having trouble understanding why my application is giving me this error.

05-22 11:26:29.636  21234-21264/com.interaptix.testApplication E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 4284
Process: com.interaptix.rbcDemo, PID: 21234
java.lang.UnsatisfiedLinkError: Native method not found: com.interaptix.vu.VuScreen.read:(JIIIILjava/nio/Buffer;)V
        at com.interaptix.vu.VuScreen.read(Native Method)
        at com.interaptix.vu.VuScreen.read(VuScreen.java:90)
        at com.interaptix.vu.VuScreen.read(VuScreen.java:96)
        at com.interaptix.rbcDemo.PlazaRenderer.renderVRPreview(PlazaRenderer.java:1259)
        at com.interaptix.rbcDemo.PlazaRenderer.renderFrame(PlazaRenderer.java:774)

VuScreen.java is in a compiled jar file, which I cannot freely edit however, Intellij's decompiler was able to give me this.

private static native void read(long var0, int var2, int var3, int var4, int var5, Buffer var6);

public void read(int x, int y, int width, int height, Buffer buffer) {
    read(this.getPtr(), x, y, width, height, buffer);
}

public void read(int x, int y, int width, int height, Bitmap bitmap) {
    ByteBuffer buffer = ByteBuffer.allocateDirect(this.getWidth() * this.getHeight() * 4);
    this.read(x, y, width, height, (Buffer)buffer);
    bitmap.copyPixelsFromBuffer(buffer);
}

I'm really perplexed as to why this error is occurring. It may perhaps be even a compiler problem. I'm using IntelliJ if that helps.

SyedKamran
  • 21
  • 7
  • I wonder if there are two versions VuScreen in your class path? Which library are you using? – longhua May 22 '15 at 16:06
  • Did you check the method's arguments ? are they correct ? – osayilgan May 22 '15 at 17:57
  • The code was originally written by someone else and I was tasked to recompile it. The original developer had several versions of the native library, I finally found the latest version. It solved the problem. Thank you for you help. – SyedKamran May 24 '15 at 04:24

0 Answers0