fresco icon indicating copy to clipboard operation
fresco copied to clipboard

when I run the sample after build in Andsudio.The fresco way is crashed

Open qiaodi opened this issue 11 years ago • 5 comments

06-04 12:26:14.422 9174-9655/com.facebook.fresco.sample W/dalvikvm﹕ threadid=44: thread exiting with uncaught exception (group=0x41649d58) 06-04 12:26:14.422 9174-9655/com.facebook.fresco.sample E/AndroidRuntime﹕ FATAL EXCEPTION: pool-11-thread-1 Process: com.facebook.fresco.sample, PID: 9174 java.lang.NoClassDefFoundError: com/facebook/imagepipeline/memory/NativeMemoryChunk 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:264) at com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.(NativePooledByteBufferOutputStream.java:53) at com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.(NativePooledByteBufferOutputStream.java:36) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newOutputStream(NativePooledByteBufferFactory.java:131) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newOutputStream(NativePooledByteBufferFactory.java:26) at com.facebook.imagepipeline.producers.NetworkFetchProducer.processResult(NetworkFetchProducer.java:119) at com.facebook.imagepipeline.producers.HttpURLConnectionNetworkFetchProducer$1.run(HttpURLConnectionNetworkFetchProducer.java:62) 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:841)

qiaodi avatar Apr 07 '15 08:04 qiaodi

06-04 12:25:00.752 8898-9121/com.facebook.fresco.sample E/AndroidRuntime﹕ FATAL EXCEPTION: OkHttp Dispatcher Process: com.facebook.fresco.sample, PID: 8898 java.lang.UnsatisfiedLinkError: Couldn't load gnustl_shared from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.facebook.fresco.sample-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.facebook.fresco.sample-1, /vendor/lib, /system/lib]]]: findLibrary returned null at java.lang.Runtime.loadLibrary(Runtime.java:358) at java.lang.System.loadLibrary(System.java:526) 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:264) 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.processResult(NetworkFetchProducer.java:117) at com.facebook.imagepipeline.backends.okhttp.OkHttpNetworkFetchProducer.access$000(OkHttpNetworkFetchProducer.java:41) at com.facebook.imagepipeline.backends.okhttp.OkHttpNetworkFetchProducer$2.onResponse(OkHttpNetworkFetchProducer.java:101) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:162) 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:841)

qiaodi avatar Apr 07 '15 08:04 qiaodi

What or where is gnustl_shared Lib

qiaodi avatar Apr 07 '15 08:04 qiaodi

This is a library included by default by C++. We are working on a way of excluding it.

tyronen avatar Apr 07 '15 11:04 tyronen

I suspect that if libgnustl_shared.so is missing then all our native libraries are missing.

So how exactly do you build the app ? I just cloned the repo, imported fresco into Android Studio, executed installDebug and now I am playing with the app - no crash.

I understand that you compile it in Android Studio ? What operating system do you use ? And what device do you test this on ? Can you extract the apk and check whether libgnustl_shared.so is there inside lib/armeabi-v7a directory ?

michalgr avatar Apr 07 '15 14:04 michalgr

Please try it again from the latest head, using the latest build instructions. Comment here if it still does not work.

tyronen avatar Apr 15 '15 09:04 tyronen