1

I am trying to get GPUImage library works on AndroidStudio and i am testing my code against Samsung Galaxy GT-I9300. I downloaded the GPUImage library as a jar file from here https://javalibs.com/artifact/jp.co.cyberagent.android.gpuimage/gpuimage-library

After importing the GPUImage library, at run time, i received the error posted below.

to solve this issue, i referred to some posts and tried loading the GPUImage lib statically as follows:

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

but this unfortunately did not solve the problem and i am still getting the same error.

please let mek now how to solve this issue and how to get GPUImage library to function properly?

error:

java.lang.UnsatisfiedLinkError: Couldn't load gpuimage-library from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.example.gpuimagetest_03-1.apk,libraryPath=/data/app-lib/com.example.gpuimagetest_03-1]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:355)
at java.lang.System.loadLibrary(System.java:525)
at com.example.gpuimagetest_03.MainActivity.<clinit>(MainActivity.java:18)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1130)
at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2210)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
at android.app.ActivityThread.access$700(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)

Build gradle(Module: app):

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
    applicationId "com.example.gpuimagetest_03"
    minSdkVersion 18
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
testCompile 'junit:junit:4.12'
compile files('C:/AmrProjects/AndroidStudioProjects/GPUImageTest_03/libs/gpuimage-library-1.3.0.jar')
}
genpfault
  • 47,669
  • 9
  • 68
  • 119
user2121
  • 6,401
  • 13
  • 57
  • 121

0 Answers0