1

Gettings this exception while starting project with GPUIMage library. Looks Like the problem is the same as Android. Couldn't load gpuimage-library. But information from the answer is not enough.

Can someone help me with it? Thanks anyway.

Exception refers to this class:

package jp.co.cyberagent.android.gpuimage;

public class GPUImageNativeLibrary {
    static {
        System.loadLibrary("gpuimage-library");
    }

    public static native void YUVtoRBGA(byte[] yuv, int width, int height, int[] out);

    public static native void YUVtoARBG(byte[] yuv, int width, int height, int[] out);
}

exception:

FATAL EXCEPTION: GLThread 2588
Process: com.blah, PID: 490                                                   
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.blah-2/base.apk"],nativeLibraryDirectories=[/data/app/com.blah-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libgpuimage-library.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at jp.co.cyberagent.android.gpuimage.GPUImageNativeLibrary.<clinit>(GPUImageNativeLibrary.java:21)
at jp.co.cyberagent.android.gpuimage.GPUImageRenderer$1.run(GPUImageRenderer.java:141)
at jp.co.cyberagent.android.gpuimage.GPUImageRenderer.runAll(GPUImageRenderer.java:126)
at jp.co.cyberagent.android.gpuimage.GPUImageRenderer.onDrawFrame(GPUImageRenderer.java:115)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1535)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
Tommy
  • 169
  • 4
  • 16
Andrew F
  • 1,712
  • 2
  • 15
  • 24

2 Answers2

0

Same problem here. To solve it I to copied the libgpuimage-library.so to the right folders:

  1. Compile and launch your app, a libgpuimage-library.so file will be generated. Search in your project folder
  2. Copy this file to your app folders: src/main/jniLibs/armeabi and src/main/jniLibs/x86, create folders if doesn't exist
  3. Run the app, now it should work the camera loading the GPUImage library.
Pelanes
  • 3,451
  • 1
  • 34
  • 32
0

Just change GPUImage 1.3.0 to 1.2.3:

compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.2.3'

Then, it will work.

Tommy
  • 169
  • 4
  • 16