fresco: When building via App Bundle, Fresco fails to find "libimagepipeline.so"
Description
When launching an Activity that uses Fresco, which has been generated via Android App Bundle, it fails to find “libimagepipeline.so” and crashes the application.
Reproduction
- Create a sample application that uses Fresco
- Generate a signed Bundle
- Using Bundle Tool build the APKs from the Bundle
- Using Bundle Tool, install the APK on to your device
- Navigate to Activity where Fresco is initialised
- Observe crash
Solution
I originally thought this might have been an issue with minify, R8, or Proguard, but I disabled all of those, and still observed the same result when building via App Bundle.
I have tested other components of my app that also use native libraries, but they all operate as expected, only with Fresco struggling to load the respective binary.
A temporary, but not ideal solution I found is disabling splitting of APK’s by abi using the following configuration, but including all the binaries results in a significantly larger APK size.
android {
// Rest of your configuration here
bundle {
abi {
enableSplit false
}
}
}
Additional Information
- Fresco version: 1.10.0
- Platform version: Samsung SM-G955F, Android 8.0.0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 15
- Comments: 21 (7 by maintainers)
I have found out an issue in SoLoader lib used by Fresco. I have prepared PR with a fix: facebook/soloader#26 That fix makes fresco works fine with app bundle. I have published the patched version of SoLoader lib. You can use it in your project if you can’t wait till PR is merged.
We’ve landed the SoLoader fix. We’ll release a new Fresco version soon once the SoLoader version has been released.
We just released version 1.12.0 that includes the fixed SoLoader version.
Hi @theromis and @sailesh2 I don’t work at Facebook (it’s so sad). I’m just a Fresco user but I couldn’t wait for a fix. So I had to debug it and fix. Currently, I use the patched version of soloder lib for my project as I described in the comment above. Most recent version is
com.avito.android:patched-soloader:0.1.2My PR to soloader lib is being reviewed now but soloader maintainer tells that there is no estimation of new soloader lib release. So It’s impossible to estimate when Fresco will use this new version.
If it’s urgent you can use my patched version. We published bundle with fresco to production. Works well.
The previous version of patched-soloader didn’t work on pre-lollipop devices. I’ve fixed it. Use
compile("com.avito.android:patched-soloader:0.1.1")SoLoader v0.6.0 has just been released and I’ve updated the Fresco dependency (6fc071d1892166d11d1f237f10e2d9bcdf858087). We want to wait for the MIT licensed Bolts release (#2257). If that release takes longer than expected, we are going to skip it for now and release without that. In any case, the new version should be out in a couple of days.
@oprisnik what’s the ETA for the releases? I get that it requires coordination of 2 teams but at least some rough number would help many developers decide if they should apply workaround above or wait for the release.
@nesterov-n thanks for great fix, any progress to integrate it into fresco?
Hi @icerfish,
Thank you for filing this issue with all the required details (maybe add a paste of the error if you have time). I can imagine that Fresco might not fully support app bundles and I do not think that we have ever tested the interplay.
I will mark this as a “bug” and “help-wanted” hoping that this is something the open-source community can help us with.