Comments (20)
I have same issue with image loading. I use SimpleDraweeView.setImageURI(Uri.parse(uriStr))
with next link: http://az735069.vo.msecnd.net/posts/25_8cb72bffeee54d50bc075be2ad3cf56a_o.jpg and I see only placeholder (picasso loads this image fine)
But with this link: https://freeme.blob.core.windows.net/posts/25_2576773736e8485f9698eb126de3960e_o image is loaded fine. I think the issue may be related with ".jpg" ending.
from fresco.
Yes, there is a typo in the documentation, it should be just .setOldController(view.getController())
, thanks.
For initialization, see our "Getting started with Fresco" page, it's on the very beginning:
http://frescolib.org/docs/index.html#_
Your code looks fine, you are just missing: Fresco.initialize(context);
somewhere near the app startup.
No casting is necessary, you can just build DraweeController
. See the example in our sample app:
https://github.com/facebook/fresco/blob/master/sample/src/main/java/com/facebook/fresco/sample/adapters/FrescoAdapter.java#L63
from fresco.
...continuing discussion from reddit comment.
"SimpleDraweeView was not initialized" is thrown if SimpleDraweeView
is instantiated without previously initializing it (static method). Fresco.initialize
does exactly that:
https://github.com/facebook/fresco/blob/master/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/Fresco.java#L44
So, I suspect that you are not calling Fresco.initialize
early enough. Where are you doing that call?
from fresco.
It's the first thing in the onCreate in an Activity!
On 27 Mar 2015, at 6:05 am, Ognjen Dragoljevic [email protected] wrote:
...continuing discussion from reddit comment.
"SimpleDraweeView was not initialized" is thrown if SimpleDraweeView is instantiated without previously initializing it (static method). Fresco.initialize does exactly that:
https://github.com/facebook/fresco/blob/master/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/Fresco.java#L44So, I suspect that you are not calling Fresco.initialize early enough. Where are you doing that call?
—
Reply to this email directly or view it on GitHub.
from fresco.
Think it needs to be done in your Application onCreate() instead
from fresco.
@fiskurgit Really? The doc does not mention that? I can't actually use an Application class, for various reasons.
from fresco.
oops, no, sorry, just looking through example code now, they're even initialising in Adapters in the sample
from fresco.
Quick update, managed to get it running with SimpleDraweeView by initializing in the activity that opens BEFORE the one in question, unfortunately it STILL does not load the image, just shows the place holder for ever. Working fine with Picasso and the same URI however
from fresco.
Even further still, using a plain SimpleDrawee, removing all code but the basic i.setImageURI(uri) will not load the, nor does it show the placeholder at anypoint (set in XML), no conflicting hierarchy set
from fresco.
It looks as though the issue is a typo in the documentation. It should be http://schemas.android.com/apk/res-auto rather than http:/schemas.android.com/apk/res-auto (note the extra '/') <- Fixed the missing placeholder, no loading still however. Just out of interest, what method do you recommend for building a Uri based on a url? Perhaps that's the issue? Is there any debug output in Fresco?
from fresco.
Uri.parse(url) should do the trick.
from fresco.
@xbroak Perhaps the problem is as simple as not having <uses-permission android:name="android.permission.INTERNET" />
in your manifest?
from fresco.
How do you build the Uri?
from fresco.
There is a bug in our default network fetcher that I'm hunting now. We also provide OkHttp fetcher that doesn't suffer this issue. See: http://frescolib.org/docs/using-other-network-layers.html#_
from fresco.
Closing this issue because it's not focused. Please create separate issues to track one thing at a time.
from fresco.
Just FYI, the issues are unfixed, i'm just going to give the lib a pass. Too many issues for me right now, perhaps i'll come take another look in the future when everythings up-to-date etc... Thanks for the help however!
from fresco.
For the record, I found the issue:
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="https://freeme.blob.core.windows.net/posts/25_8cb72bffeee54d50bc075be2ad3cf56a_o.jpg">here</a>.</h2>
</body></html>
HttpURLConnection does not follow redirection.
from fresco.
@xbroak , it would help if you could create a separate issue for each problem you have rather than just dumping all of them in one issue.
The URI redirection issue can be solved by using some smarter networking library, rather than the default one which is pretty cumbersome. We do provide OkHttp integration and it should be pretty straightforward to set it up. There is a section in our documentation.
As for the other issues, I don't know what else is there left? There were a couple of typos in the docs, but I believe this has been resolved?
from fresco.
I didn't have a URI Redirection problem? That was another user! Regardless, good luck with the project! :)
from fresco.
Well, i went ahead and added the OKHttp just to see if it made any difference, only to hit another issue:
java.lang.NoSuchMethodError: com.squareup.okhttp.OkHttpClient.open
at com.squareup.okhttp.OkUrlFactory.open(OkUrlFactory.java:44)
using: compile 'com.facebook.fresco:imagepipeline-okhttp:0.1.0+'
from fresco.
Related Issues (20)
- OutOfMemoryError: Failed to allocate a 251648770 byte allocation [Local large images allocation issue] HOT 2
- While updating app from playstore the images not displaying properly HOT 2
- In the document, the Korean link has been cracked to some Ad link. HOT 2
- fetchWithRequest Override
- there has a memory leak, AndroidProfile tools tips me that "mCallerContext in com.facebook.imagepipeline.cache.BitmapMemoryCacheKey"。 HOT 3
- Fresco Unsatisfied Link Error
- IllegalStateException
- when update 3.1.0 Building error:Failed to transform vito-options-3.1.0.aar HOT 2
- Libwebp v1.0.0 存在CVE-2023-4863漏洞 HOT 7
- 3.1.1 Exception loading animated gif HOT 2
- GIFs do not load on v3.1.3 HOT 3
- Bug: Crash on MIUI 14.0.5 HOT 1
- React Native app crashes on startup with fresco version 3.1.3 HOT 11
- java.lang.ClassNotFoundException: Didn't find class "com.facebook.imagepipeline.nativecode.NativeJpegTranscoderFactory"
- Fresco is dying. HOT 1
- too many gifs in recyclerview
- How to get free hard cap?
- error initializing Fresco HOT 1
- Can't render high quality images in react-native because of Fresco
- Picture just get "blown-up" when I use RoundingParams to get a rounded corner picture
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fresco.