RN 0.67 with Fresco patch to disable image downsampling
Intallation
- Create a new React Native 0.67 project using this template:
npx @react-native-community/cli@next init --template=@lytrax/react-native-fresco <ProjectName>
cd <ProjectName>
- Run
fresco-setup
script to clone, checkout Fresco 2.5.0 and patchDecodeProducer.java
:
yarn fresco-setup
-
Download and unzip/install Android NDK Revision 23. I have downloaded
android-ndk-r23b-windows.zip
and unzipped it underG:\Dev\Android\android-ndk-r23b
on Windows. -
Create
android/libraries/fresco/local.properties
with the following contents:
ndk.dir=G:\\Dev\\Android\\android-ndk-r23b
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
Remember to change ndk.dir
to the actual path that you've installed NDK R23b.
- Open an Android Emulator and build the app:
yarn android
Screenshots
Before patch/build | After patch/build |
---|---|
Troubleshooting
If you get any errors when debugging regarding Fresco Flipper Plugin, you either comment to disable flipper-fresco-plugin
inside android/app/build.gradle
, or build custom Fresco only for release builds.