fresco

Error:Execution failed for task ':app:dexDebug'. finished with non-zero exit value 2 with Facebook Fresco

人盡茶涼 提交于 2019-12-04 09:16:18
I've read every single thread regarding this issue here and I can't find any answer to my problem. After adding the Fresco lib I'm getting this error when building my app. The problematic line is: compile 'com.facebook.fresco:fresco:0.5.3+' The error: Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_71\bin\java.exe'' finished with non-zero exit value 2 If I take the fresco compile line out, it works. My gradle looks like this : buildscript { repositories

How I can update image of fresco SimpleDraweeView, if it was set once by setImageURI

筅森魡賤 提交于 2019-12-03 12:56:10
I am using Facebook Fresco library and SimpleDraweeView for displaying avatar image from file: Uri avaURI = Uri.fromFile(new File(getCacheDir(), Constants.AVA_FILE_NAME)); simpleDrawee.setImageURI(avaURI); But what if I changed file with picture (deleted previous file and created the same one with new image), how can I update (refresh) SimpleDraweeView? Its still display the old version of image. (I tried to disable cache by Fresco.getImagePipeline().evictFromMemoryCache(avaURI); but it didn't help). I believe you were on the right track. There are two more levels of storage that the old image

App random crashes with Fatal signal 7 (SIGBUS), code 2 or Fatal signal 11 (SIGSEGV), code 1

无人久伴 提交于 2019-12-03 11:12:29
问题 Context I'm creating an app that's supposed to show some images on a Fragment , most of them downloaded from the internet. I'm using Glide to handle that image loading for me on my CardViews and Fresco on my image slider (And this question on SO explains why I'm using two image libs). The Fresco part of the lib is mostly based on this fork of the AndroidImageSlider . Important: The images that I'm trying to load can either be PNG or SVG . More info: I'm using a Moto Maxx (international

Android - How to get image file from Fresco disk cache?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 07:36:30
问题 I am using the Fresco library. I can't find any related info in the Fresco documentation, how can I get an image file from Fresco's disk cache? 回答1: if the image have download in cache,you can do it like: ImageRequest imageRequest=ImageRequest.fromUri(url); CacheKey cacheKey=DefaultCacheKeyFactory.getInstance() .getEncodedCacheKey(imageRequest); BinaryResource resource = ImagePipelineFactory.getInstance() .getMainDiskStorageCache().getResource(cacheKey); File file=((FileBinaryResource

App random crashes with Fatal signal 7 (SIGBUS), code 2 or Fatal signal 11 (SIGSEGV), code 1

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 02:42:46
Context I'm creating an app that's supposed to show some images on a Fragment , most of them downloaded from the internet. I'm using Glide to handle that image loading for me on my CardViews and Fresco on my image slider (And this question on SO explains why I'm using two image libs). The Fresco part of the lib is mostly based on this fork of the AndroidImageSlider . Important: The images that I'm trying to load can either be PNG or SVG . More info: I'm using a Moto Maxx (international version of the Droid Turbo ) running Android 5.0.2. Also happened on a Samsung Galaxy S4 running Android 4.4

Android - How to get image file from Fresco disk cache?

回眸只為那壹抹淺笑 提交于 2019-12-02 22:24:26
I am using the Fresco library. I can't find any related info in the Fresco documentation, how can I get an image file from Fresco's disk cache? danhantao if the image have download in cache,you can do it like: ImageRequest imageRequest=ImageRequest.fromUri(url); CacheKey cacheKey=DefaultCacheKeyFactory.getInstance() .getEncodedCacheKey(imageRequest); BinaryResource resource = ImagePipelineFactory.getInstance() .getMainDiskStorageCache().getResource(cacheKey); File file=((FileBinaryResource)resource).getFile(); I hope this helps Check Plamenkos answer on this link.. https://github.com/facebook

RecyclerView -- 给你一个不卡的滑动列表

拈花ヽ惹草 提交于 2019-12-02 17:59:53
https://www.jianshu.com/p/519bb23987ca 看完此文章 你就会学到什么... RecyclerView添加头部,尾部,或list列表中某位置添加view RecyclerView+SwipeRefreshLayout 实现上下拉刷新效果 分页加载数据 列表优化方案 利用Glide加载图片,滑动的时候按back键,App会crash蹦掉处理。 添加依赖 //recyclerview compile 'com.android.support:recyclerview-v7:25.1.1' //glide compile 'com.github.bumptech.glide:glide:3.7.0' //butterknife 注意需要在三个第三添加代码 //1 module gradle里面底部添加 compile 'com.jakewharton:butterknife:8.5.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' //2 module gradle 里面顶部添加 apply plugin: 'com.jakewharton.butterknife' //3 在project gradle里面添加 dependencies { classpath

RecyclerView -- 给你一个不卡的滑动列表

别来无恙 提交于 2019-12-02 17:34:45
https://www.jianshu.com/p/519bb23987ca 看完此文章 你就会学到什么... RecyclerView添加头部,尾部,或list列表中某位置添加view RecyclerView+SwipeRefreshLayout 实现上下拉刷新效果 分页加载数据 列表优化方案 利用Glide加载图片,滑动的时候按back键,App会crash蹦掉处理。 添加依赖 //recyclerview compile 'com.android.support:recyclerview-v7:25.1.1' //glide compile 'com.github.bumptech.glide:glide:3.7.0' //butterknife 注意需要在三个第三添加代码 //1 module gradle里面底部添加 compile 'com.jakewharton:butterknife:8.5.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' //2 module gradle 里面顶部添加 apply plugin: 'com.jakewharton.butterknife' //3 在project gradle里面添加 dependencies { classpath

Fresco image loading callback

你。 提交于 2019-12-01 20:27:30
I have just migrated to the Fresco library for loading images in my app. I need to listen to Image Loading Events, of course I read this article in documentation Listening to download events This is exactly what I need, but.... There few things that I don't like. My goal is to hide View if it fails to download it from the net. I cannot reference SimpleDraweeView from controller, even on callback method. I need to hide View , but it seems that I cannot get reference to it. Each time I need to load image, I need to create object of controller using Builder , and this can cause performance issues

SimpleDraweeView not resizing after scaling image in fresco

 ̄綄美尐妖づ 提交于 2019-11-29 15:29:51
I'm using fresco to display images in a list view. however i have an issue. when i scale my image using methods that maintain aspect ratio like CENTER_CROP, and the scaled image height becomes smaller than my simpledraweeview's height, simple-Drawee-View isn't automatically resized to match size of scaled image. I have tried to use android:adjustViewBounds = true But it doesn't work. i have also tried the method below but scaleY which i wanted to use to calculate scaled height returns 1 even when image height is smaller than simpe-drawee-view's height float[] f = new float[9] draweeView