[Android] Fresco initialized multiple times
See original GitHub issueW/unknown:Fresco: Fresco has already been initialized! Fresco.initialize(...)
should only be called 1 single time to avoid memory leaks!
If Android has already used Fresco in its native codes, which means we have already done
Fresco.initialize(this, config);
in our application.
The FrescoModule
will still initialize Fresco, which causes fresco initialized twice.
@Override
public void initialize() {
super.initialize();
// Make sure the SoLoaderShim is configured to use our loader for native libraries.
// This code can be removed if using Fresco from Maven rather than from source
SoLoaderShim.setHandler(new FrescoHandler());
Context context = getReactApplicationContext().getApplicationContext();
Fresco.initialize(context, mConfig);
mConfig = null;
}
We should be able to disable the second initialize.
react-native 0.31, Mac, Android.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
[Android] Fresco initialized multiple times | Voters | React Native
[Android] Fresco initialized multiple times. Nicolas Charpentier. Moved from https://github.com/facebook/react-native/issues/9558 · November 13, 2016.
Read more >Fresco.initialize not working in Fragment - Stack Overflow
Fresco is not working when I am initializing it in the OnCreate or OnCreateView of the fragment. Is there something I am doing...
Read more >Configuring the Image Pipeline - Fresco
Most apps can initialize Fresco completely by the simple command:
Read more >Displaying Images with Fresco Library in Android - Section.io
Fresco was open-sourced for the first time in early 2015. ... To avoid the problem of an Android bitmap taking up a lot...
Read more >Giphy Android App and Fresco
Testing the new app codebase showed promising results, except for the GIF rendering. Renditions took a lot of time to load and feedback...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am too getting this issue in android. This is occuring again recently after I have updated my fresco to 1.8.1
I am getting this issue in 0.53
Fresco has already been initialized!
Fresco.initialize(…)should only be called 1 single time to avoid memory leaks!