Skip to content

clytras/react-native-fresco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RN 0.67 with Fresco patch to disable image downsampling

Intallation

  1. 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>
  1. Run fresco-setup script to clone, checkout Fresco 2.5.0 and patch DecodeProducer.java:
yarn fresco-setup
  1. Download and unzip/install Android NDK Revision 23. I have downloaded android-ndk-r23b-windows.zip and unzipped it under G:\Dev\Android\android-ndk-r23b on Windows.

  2. 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.

  1. Open an Android Emulator and build the app:
yarn android

Screenshots

Before patch/build After patch/build
Before Fresco patch After Fresco patch

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.