-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.UnsatisfiedLinkError couldn't find DSO to load: libimagepipeline.so #2076
Comments
Possibly duplicate of #2049. |
Yes, this seems to be a duplicate of #2049 (especially #2049 (comment)). @jyh149129, I'm closing the issue here to focus the discussion there :) Thanks @gengjiawen! |
fuck the react |
Where is the solution? I am facing issue in 1.13.0 version of Fresco dependency. Please help me out. |
I think I found why this bug happened, because the cpu_abi of /data/data/yourpackage/lib and /data/data/yourpackage/lib-main is different. I have fixed the bug on my OPPO by modifying code, I will make a pull request later, expecting to help your guys. |
Awesome, thanks for investigating @artemisia! |
@artemisia Wish to see your PR!This bug confuses me a lot... |
Sorry, my english is bad. Device: Mobile Device: OPPC R7sm (AndroLinkid 5.1.1) I check path data/app//lib/. Find is arm, is not arm64. Generally should be arm64 When init soloader, will unzip data/app//*.apk. And copy .so to data/data//lib-main. The get supportedAbis is ["arm64-v8a", "armeabi-v7a", "armeabi"]. Confirm the *.so file sequentially. Lead to *.so is 64-bit instead of 32-bit issue. My solution: Modify SoLoader library. Add check data/app//lib/ is arm or arm64. File: ...
final ZipDso[] ensureDsos() {
if (mDsos == null) {
Set<String> librariesAbiSet = new LinkedHashSet<>();
HashMap<String, ZipDso> providedLibraries = new HashMap<>();
Pattern zipSearchPattern = Pattern.compile(mZipSearchPattern);
String[] supportedAbis = SysUtil.getSupportedAbis();
Enumeration<? extends ZipEntry> entries = mZipFile.entries();
+ // Fixed couldn't find DSO to load: "xxx.os" is 64-bit instead of 32-bit
+ File sysLibPath = new File(mContext.getApplicationInfo().nativeLibraryDir);
+ String sysLibAbi = sysLibPath.getPath().substring(sysLibPath.getPath().lastIndexOf("/")+1);
+ if(sysLibAbi.equalsIgnoreCase("arm")) {
+ // sys lib is load armeabi-v7a, this exception case
+ ArrayList<String> newSupportedAbis = new ArrayList();
+ for(String abi : supportedAbis) {
+ if(abi.equalsIgnoreCase("arm64-v8a")) {
+ //skip arm64-v8a
+ continue;
+ }
+
+ newSupportedAbis.add(abi);
+ }
+
+ supportedAbis = newSupportedAbis.toArray(new String[newSupportedAbis.size()]);
+ }
while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement();
Matcher m = zipSearchPattern.matcher(entry.getName());
... |
Welcome Flutter |
Info:
couldn't find DSO to load: libimagepipeline.so
com.facebook.soloader.SoLoader.void doLoadLibraryBySoName(java.lang.String,int,android.os.StrictMode$ThreadPolicy)...
03-23 19:21:55.955 17814 17931 E art : dlopen("/data/data/xxx/lib-main/libimagepipeline.so", RTLD_LAZY) failed: dlopen failed: "/data/data/xxx/lib-main/libimagepipeline.so" is 64-bit instead of 32-bit
03-23 19:21:55.955 17814 17931 E SoLoader: Could not load: libimagepipeline.so
detail
com.facebook.soloader.SoLoader.void doLoadLibraryBySoName(java.lang.String,int,android.os.StrictMode$ThreadPolicy)(SoLoader.java:522)
com.facebook.soloader.SoLoader.void loadLibraryBySoName(java.lang.String,java.lang.String,java.lang.String,int,android.os.StrictMode$ThreadPolicy)(SoLoader.java:420)
com.facebook.soloader.SoLoader.void loadLibrary(java.lang.String,int)(SoLoader.java:370)
com.facebook.soloader.SoLoader.void loadLibrary(java.lang.String)(SoLoader.java:335)
com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.void load()(ImagePipelineNativeLoader.java:42)
com.facebook.imagepipeline.memory.NativeMemoryChunk.void ()(NativeMemoryChunk.java:33)
com.facebook.imagepipeline.memory.NativeMemoryChunkPool.com.facebook.imagepipeline.memory.NativeMemoryChunk alloc(int)(NativeMemoryChunkPool.java:58)
com.facebook.imagepipeline.memory.NativeMemoryChunkPool.void free(java.lang.Object)(NativeMemoryChunkPool.java:20)
##parent##1##parent##
##child## java.lang.Object alloc(int)##child##
com.facebook.imagepipeline.memory.BasePool.java.lang.Object get(int)(BasePool.java:257)
com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.void (com.facebook.imagepipeline.memory.NativeMemoryChunkPool,int)(NativePooledByteBufferOutputStream.java:51)
com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.com.facebook.imagepipeline.memory.NativePooledByteBuffer newByteBuffer(java.io.InputStream,int)(NativePooledByteBufferFactory.java:98)
com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.com.facebook.common.memory.PooledByteBufferOutputStream newOutputStream(int)(NativePooledByteBufferFactory.java:26)
##parent##4##parent##
##child## com.facebook.common.memory.PooledByteBufferOutputStream newOutputStream()##child##
##child## com.facebook.common.memory.PooledByteBuffer newByteBuffer(java.io.InputStream,int)##child##
##child## com.facebook.common.memory.PooledByteBuffer newByteBuffer(byte[])##child##
##child## com.facebook.common.memory.PooledByteBuffer newByteBuffer(java.io.InputStream)##child##
com.facebook.imagepipeline.producers.LocalFetchProducer.com.facebook.imagepipeline.image.EncodedImage getByteBufferBackedEncodedImage(java.io.InputStream,int)(LocalFetchProducer.java:89)
##parent##2##parent##
##child## com.facebook.imagepipeline.image.EncodedImage getEncodedImage(com.facebook.imagepipeline.request.ImageRequest)##child##
##child## java.lang.String getProducerName()##child##
com.facebook.imagepipeline.producers.LocalFetchProducer.com.facebook.imagepipeline.image.EncodedImage getEncodedImage(java.io.InputStream,int)(LocalFetchProducer.java:101)
com.facebook.imagepipeline.producers.LocalFileFetchProducer.com.facebook.imagepipeline.image.EncodedImage getEncodedImage(com.facebook.imagepipeline.request.ImageRequest)(LocalFileFetchProducer.java:34)
com.facebook.imagepipeline.producers.LocalFetchProducer$1.com.facebook.imagepipeline.image.EncodedImage getResult()(LocalFetchProducer.java:54)
com.facebook.imagepipeline.producers.LocalFetchProducer$1.java.lang.Object getResult()(LocalFetchProducer.java:50)
com.facebook.common.executors.StatefulRunnable.void run()(StatefulRunnable.java:45)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
com.facebook.imagepipeline.core.PriorityThreadFactory$1.void run()(PriorityThreadFactory.java:53)
java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered: