java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.blink.academy.fork-1/base.apk"],nativeLibraryDirectories=[/data/app/com.blink.academy.fork-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libmemchunk.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:989)
at com.facebook.common.soloader.SoLoaderShim$DefaultHandler.loadLibrary(SoLoaderShim.java:34)
at com.facebook.common.soloader.SoLoaderShim.loadLibrary(SoLoaderShim.java:56)
at com.facebook.imagepipeline.memory.NativeMemoryChunk.(NativeMemoryChunk.java:36)
at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:60)
at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:22)
at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:260)
at com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.(NativePooledByteBufferOutputStream.java:53)
at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newOutputStream(NativePooledByteBufferFactory.java:141)
at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newOutputStream(NativePooledByteBufferFactory.java:26)
at com.facebook.imagepipeline.producers.NetworkFetchProducer.onResponse(NetworkFetchProducer.java:95)
at com.facebook.imagepipeline.producers.NetworkFetchProducer.access$000(NetworkFetchProducer.java:36)
at com.facebook.imagepipeline.producers.NetworkFetchProducer$1.onResponse(NetworkFetchProducer.java:73)
at com.blink.academy.fork.fresco.imagepipeline.OkHttpNetworkFetcher$2.onResponse(OkHttpNetworkFetcher.java:96)
at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:168)
at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
http://frescolib.org/docs/multiple-apks.html
Are you using the split for 64 bit as mentioned in the link.
@TarangS I used the split for 64 like the link said. and got the error as mentioned. what can I do ?
Are you experiencing this on all devices or just on 64-bit?
@tyronen I want all devices installed without 64-bit libs. Is this possible?
I get the same error,And I have added the fresco proguard lines. It occcurs on 4.4.2,4.2.2 and 4.2.1 on
Mediatek MT6589, and Mediatek MT6572(Dual-core 1.3 GHz Cortex-A7)
see also details in #732
Bumped into the same issue.
Previously the app worked fine.
The directory /data/app/{APP_NAME}/lib is empty indeed.
Not sure, but it might be related to to multidex(?) config.
I'll try to rollback my config and provide more details
Our application have been using fresco for 3 month and last release was month ago. But on Oct 30 we got first crash report and lots of crashes in subsequent days. We do not use proguard and multidex. (see report #732 )
Same here.the gradle file indicates compile('com.facebook.fresco:fresco:0.6.1+') . I have to check the release versions once
EDIT : using 0.6.1
The problem can be reproduced when using com.android.tools.build:gradle:1.5.0-beta1
In this case the directory /data/app/{APP_NAME}/lib is empty
When rolled back to the previous version, com.android.tools.build:gradle:1.4.0-beta6
everything is OK and /data/app/{APP_NAME}/lib is NOT empty after installation.
This is not specific to the beta versions:
I am using quite an old setup : Fresco: 0.6.1 and com.android.tools.build:gradle:1.3.0
Any solution for this yet?
Let's try to figure out what is going on here. Could you please unzip your apk and examine content of lib directory ? Things that would be suspicious:
lib directory in the apk is emptylibmemchunk.soHi @michalgr
I also got this error, and here's the content of the libs folder.


I noticed that there are no libmemchunk.so in the MIPS folder. could this be the issue?
and to give you some insights, here's the crash readings from new relic.

Crash info:
java.lang.UnsatisfiedLinkError
SoLoaderShim.java line 32 in SoLoaderShim$DefaultHandler.loadLibrary()
Couldn't load memchunk from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/system/app/43b92bc1341988f8ff3dd1c990171a05.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]]: findLibrary returned null
Yep, that would cause the crash on MIPS devices. Do you have a breakdown by the processor architecture ?
@michalgr ,You mean the breakdown in the new relic report?
No, we don't have that. Can only see the name of the devices.
but if we google the devices, most of them are using MediaTek Processors
MT6572 / MT 6582
My findings are the same as @mozes-pb , MeditaTek causes the issue
I think this issue is very similar to this one related to realm.io https://github.com/realm/realm-java/issues/1421 Unfortunately, I can't use realm and fresco in my project with gradle plugins 1.4 and 1.5. Realm supports 1.5.0-beta1, but does not support 1.4.0-beta6. Fresco supports 1.4.0-beta6, but does not 1.5.0-beta1.
We've done nothing with this issue, but number of crashes has decreased. What's happening?

I presume this issue would happen as soon as the app starts,(during the Fresco.initialize() bit?)
It looks like problem is solved with gradle plugin 1.5.0 release
I am using 1.3.0 ,are you saying the 1.5.0 release solves the problem of the beta release or all the prior versions too?
@droidekas Fresco was not working for me with 1.5.0 beta 1, with 1.5.0 release it works well. 1.4.0 beta 6 was also ok
Hi guys,
anyone managed to reproduce this issue at least?
i have the mediatek device, but still cannot reproduce this issue. so I kinda confused on how to find the problems and how to at least try to solve this issue.
if anyone did successfully reproduce this issue, can you share them with us on how to reproduce it?
Thanks.
Hi Guys,
just want to give an update that with gradle 1.5.0 this errors still exist.
Thanks
Any solution for this yet? Using gradle 1.5.0 here too.
hm... In my case after upgrading com.android.tools.build:gradle to v.1.5.0 the problem disappeared.
fresco + gradle 1.5.0 or 2.0.0-alpha1 works fine for me.
I had this problem, but what I changed was the
dependencies {
classpath: 'com.google.gms:google-services:1.3.1'
}
when I updated to 1.5.0-beta2 I started getting the crash.... Just made the rollback and it stopped
@githubdoramon I was having the same problem. I updated google-services in my project build.gradle and I was getting the crash. When I updated my gradle version to 1.5 as well, the crash went away. Try setting your project build.gradle to have:
buildscript {
repositories {
jcenter()
}
dependencies {
//list of gradle versions: http://developer.android.com/tools/revisions/gradle-plugin.html
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.google.gms:google-services:1.5.0-beta2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
We are seeing the same issue on a fair chunk of our users too.
We are using Fresco 0.9.0 and gradle 2.0.0-beta2
Any news on this?
Same issue:
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load memchunk: findLibrary returned null
Fresco 0.9.0
com.android.tools.build:gradle:2.0.0-beta6
Use APK split by ABI
Sony Ericson Xperia LT15i (Android 2.3.4, armv7l): * Duplicated*
Nexus 5 (Android 6.0.1): Can't duplicate
Experiencing the same on Galaxy X 4.1.1 stock and Fresco 0.9.0
experiencing this on 4.2.2 ASUS phone. Using gradle 1.5.0
i experience this problem on Huawei 4.1 and Fresco 0.9.0 and the problem is below:
java.lang.NoClassDefFoundError: com/facebook/imagepipeline/nativecode/JpegTranscoder
and lib "libwebp" can not loaded
finally I add this code, there will be OK:
static{
System.loadLibrary("webp");
System.loadLibrary("imagepipeline")
}
before use Fresco
After all, what's the right solution?
static{ System.loadLibrary("webp"); System.loadLibrary("imagepipeline") }
OR
static { SoLoaderShim.loadLibrary("webp"); }
?
I can't simulate the error here, so I don't know what's really working!
what's your problem, and you can attach your log
What is the solution?
My problem were:
At:
at com.facebook.imagepipeline.producers.ResizeAndRotateProducer$TransformingConsumer.doTransform(ResizeAndRotateProducer.java)
...
java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1636): could not load library "libwebp.so" needed by "libimagepipeline.so"; caused by load_library(linker.cpp:746): library "libwebp.so" not found
Got it fixed using this on my Application, before Fresco.initialize(this):
static {
try {
SoLoaderShim.loadLibrary("webp");
} catch(UnsatisfiedLinkError nle) {
}
}
Can you try with the solution in #933?
Fixed as well with solution described by @ivanviragine
@ivanviragine's solution works for me. But, the following are a bit unsettling:
webp formatted images in my app (I double-checked). So, I don't get why I'm seeing this issue. com.facebook.fresco:webpsupport as a dependency. Doesn't @ivanviragine's solution depend on its inclusion?Moving from 0.9.0 to 0.10.0 fixed this issue out of the box. @ivanviragine's snippet was not required. Neither was com.facebook.fresco:webpsupport.
@vikramkakkar
1) I don't know the source code, so I don't know 100% about it, but our clients are not complaining and not reporting errors anymore, and there are more than 30k users! So, I think it fixes for a lot of devices!
2) Sounds like a lib init problem, so it doesn't really depends on wether you are using it or not
3) Nope, my dependencies are:
compile('com.facebook.fresco:fresco:0.9.0+') { exclude module: 'bolts-android' }
compile('com.facebook.fresco:imagepipeline-okhttp:0.9.0+') { exclude module: 'bolts-android' }
compile('jp.wasabeef:fresco-processors:2.0.0') { exclude module: 'bolts-android' }
@ivanviragine Thanks for your help! We're not seeing any issues after adding your fix.
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load libpjsua.so from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.piyush.demopjsua-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.piyush.demopjsua-1, /vendor/lib, /system/lib]]]: findLibrary returned null
please help me in that
i have files in libs folder of .apk file
error:java.lang.UnsatisfiedLinkError,crash on mips cpu
same error when transfer the app to sd and vice versa
what's the solution of this issue? got tons of crash report from this related issue.
We also have this problem and fail to reproduce the issue.

The device info is :

And our build config is:


Most helpful comment
My problem were:
At:
at com.facebook.imagepipeline.producers.ResizeAndRotateProducer$TransformingConsumer.doTransform(ResizeAndRotateProducer.java)...
java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1636): could not load library "libwebp.so" needed by "libimagepipeline.so"; caused by load_library(linker.cpp:746): library "libwebp.so" not foundGot it fixed using this on my Application, before Fresco.initialize(this):
static { try { SoLoaderShim.loadLibrary("webp"); } catch(UnsatisfiedLinkError nle) { } }