04-2915:01:09.7201418614500E######################################################: Debug: [JNI_OnLoad]04-29 15:01:09.720 14186 14500 E zygote : No implementation found for long com.facebook.imagepipeline.memory.NativeMemoryChunk.nativeAllocate(int) (tried Java_com_facebook_imagepipeline_memory_NativeMemoryChunk_nativeAllocate and Java_com_facebook_imagepipeline_memory_NativeMemoryChunk_nativeAllocate__I)
04-2915:01:09.7211418614500EAndroidRuntime:FATALEXCEPTION:FrescoIoBoundExecutor-204-2915:01:09.7211418614500EAndroidRuntime:Process:com.zhiliaoapp.musically,PID:1418604-29 15:01:09.721 14186 14500 E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for long com.facebook.imagepipeline.memory.NativeMemoryChunk.nativeAllocate(int) (tried Java_com_facebook_imagepipeline_memory_NativeMemoryChunk_nativeAllocate and Java_com_facebook_imagepipeline_memory_NativeMemoryChunk_nativeAllocate__I)
04-29 15:01:10.514 14186 14194 E zygote : No implementation found for void com.facebook.imagepipeline.memory.NativeMemoryChunk.nativeFree(long) (tried Java_com_facebook_imagepipeline_memory_NativeMemoryChunk_nativeFree and Java_com_facebook_imagepipeline_memory_NativeMemoryChunk_nativeFree__J)
04-29 15:01:10.514 14186 14194 E System : java.lang.UnsatisfiedLinkError: No implementation found for void com.facebook.imagepipeline.memory.NativeMemoryChunk.nativeFree(long) (tried Java_com_facebook_imagepipeline_memory_NativeMemoryChunk_nativeFree and Java_com_facebook_imagepipeline_memory_NativeMemoryChunk_nativeFree__J)
其实也简单,做中间商,手动调用原来的libimagepipeline.so库函数,并把结果返回
测试过程中也发现了一些其它问题,可能是版本不匹配,也可能是各种权限的错误
04-2902:04:46.6671956319889EAndroidRuntime:FATALEXCEPTION:FrescoIoBoundExecutor-204-2902:04:46.6671956319889EAndroidRuntime:Process:com.zhiliaoapp.musically,PID:1956304-29 02:04:46.667 19563 19889 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so caused by: ELF file does not contain dynamic linking information
04-29 02:04:46.667 19563 19889 E AndroidRuntime: at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SourceFile:703)
04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.soloader.SoLoader.loadLibraryBySoName(SourceFile:564)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.soloader.SoLoader.loadLibrary(SourceFile:500)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.soloader.SoLoader.loadLibrary(SourceFile:455)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imageutils.FrescoSoLoader.loadLibrary(SourceFile:27)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.nativecode.a.load(SourceFile:40)04-29 02:04:46.667 19563 19889 E AndroidRuntime: at com.facebook.imagepipeline.memory.NativeMemoryChunk.<clinit>(SourceFile:31)
04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.memory.y.h(SourceFile:25)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.memory.y.a(SourceFile:13)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.memory.a.get(SourceFile:267)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.memory.x.<init>(SourceFile:51)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.memory.x.<init>(SourceFile:33)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.memory.w.newByteBuffer(SourceFile:48)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.memory.w.newByteBuffer(SourceFile:24)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.producers.aa.a(SourceFile:85)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.producers.aa.b(SourceFile:99)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.producers.ac.a(SourceFile:37)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.producers.aa$1.c(SourceFile:52)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.producers.aa$1.b(SourceFile:48)04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.common.executors.f.run(SourceFile:43)04-29 02:04:46.667 19563 19889 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
04-29 02:04:46.667 19563 19889 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
04-2902:04:46.6671956319889EAndroidRuntime:atcom.facebook.imagepipeline.core.j$1.run(SourceFile:51)04-2902:04:46.6671956319889EAndroidRuntime:atjava.lang.Thread.run(Thread.java:764)