@lytrax/react-native-fresco

1.0.2 • Public • Published

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.

Package Sidebar

Install

npm i @lytrax/react-native-fresco

Weekly Downloads

5

Version

1.0.2

License

MIT

Unpacked Size

962 kB

Total Files

66

Last publish

Collaborators

  • clytras