question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dlopen failed: library "/system/lib/libimagepipeline.so"

See original GitHub issue

From the user’s statistical log,The test did not happen,Uncertainty,only in 7.1 devices。 The user’s device is xiaomi mix2(7.1),but I did not appear in google pixel。 I read the previous issuse, they are through the SoLoader or ReLinker library to fix?

"fresco" : "com.facebook.fresco:fresco:1.3.0",
 "fresco_gif" : "com.facebook.fresco:animated-gif:1.3.0",
 ndk {
            abiFilters "armeabi"
   }

java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib/libimagepipeline.so" 
needed or dlopened by "/system/lib/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
	java.lang.Runtime.loadLibrary0(Runtime.java:989)
	java.lang.System.loadLibrary(System.java:1530)
	com.facebook.common.soloader.SoLoaderShim$DefaultHandler.loadLibrary(SoLoaderShim.java:32)
	com.facebook.common.soloader.SoLoaderShim.loadLibrary(SoLoaderShim.java:56)
	com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load(ImagePipelineNativeLoader.java:43)
	com.facebook.imagepipeline.memory.NativeMemoryChunk.<clinit>(NativeMemoryChunk.java:36)
	com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:60)
	com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:22)
	com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:260)
	com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.<init>(NativePooledByteBufferOutputStream.java:53)
	com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:100)
	com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:28)
	com.facebook.imagepipeline.cache.BufferedDiskCache.readFromDiskCache(BufferedDiskCache.java:341)
	com.facebook.imagepipeline.cache.BufferedDiskCache.access$400(BufferedDiskCache.java:38)
	com.facebook.imagepipeline.cache.BufferedDiskCache$2.call(BufferedDiskCache.java:185)
	com.facebook.imagepipeline.cache.BufferedDiskCache$2.call(BufferedDiskCache.java:168)
	bolts.g$5.run(Task.java:357)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	java.lang.Thread.run(Thread.java:761)

java.lang.NoClassDefFoundError: <clinit> failed for class com.facebook.imagepipeline.memory.NativeMemoryChunk; see exception in other thread
	com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:60)
	com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:22)
	com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:260)
	com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.<init>(NativePooledByteBufferOutputStream.java:53)
	com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:100)
	com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:28)
	com.facebook.imagepipeline.cache.BufferedDiskCache.readFromDiskCache(BufferedDiskCache.java:341)
	com.facebook.imagepipeline.cache.BufferedDiskCache.access$400(BufferedDiskCache.java:38)
	com.facebook.imagepipeline.cache.BufferedDiskCache$2.call(BufferedDiskCache.java:185)
	com.facebook.imagepipeline.cache.BufferedDiskCache$2.call(BufferedDiskCache.java:168)
	bolts.g$5.run(Task.java:357)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
	java.lang.Thread.run(Thread.java:761)
	

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
efrohnhoefercommented, Oct 5, 2017

There are number of issues loading native libraries on older versions of Android. There are a number of similar issues already reported. Give either SoLoader or ReLinker a try.

If you want to use ReLinker you can just add the following before initializing Fresco:

        SoLoaderShim.setHandler(soName ->
                ReLinker.loadLibrary(context, soName)
        );

You probably also want to include the other ARM variants (armeabi-v7a, arm64-v8a) in your abiFilters list. armeabi is only used needed for devices running Gingerbread.

0reactions
oy2898601commented, Dec 23, 2021

If your project only contains armeabi libs. You can find the freso path in your gradle caches path. (/Users//.gradle/caches///.**.fresco)

Then go to imagepipeline dir. Rename imagepipeline-...aar to imagepipeline-...zip. Unzip it and copy the imagepipeline.so in armeabi-v7a to your project’s libs/armeabi dir.

This works for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NDK Unable to load library UnsatisfiedLinkError: dlopen failed
But I'm getting the following error on Pixel 7 Pro devices. Caused by java.lang.UnsatisfiedLinkError: dlopen failed: library ...
Read more >
java.lang.UnsatisfiedLinkError: dlopen failed: library ... - GitHub
I am running ubuntu 20 and whenever I run the emulator I get the following error. E/AndroidRuntime: FATAL EXCEPTION: main Process: com.ethicalml ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found