software-mansion / software-mansion/react-native-reanimated

Shared Element Transitions not working for Android in Release build with Proguard enabled.

Open
#4,682 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Shared Element Transitions Needs review Platform: Android Repro provided
Dominant language
TypeScript
Stars
11k
Forks
1.5k
Avg merge
3d 4h
Merged PRs (30d)
172

Description

Description

On enabling proguard and creating release build

-keep class com.swmansion.reanimated.** { *; }
-keep class com.facebook.react.turbomodule.** { *; }

shared transitions stop working in the android release build.

In the minimal repo inside App.tsx I am calling ManyScreensExample to test the transition.

Steps to reproduce

In main branch run
npx react-native build-android --mode=release

https://github.com/software-mansion/react-native-reanimated/assets/11266456/96f1babe-c8e4-4bce-b439-36f2b3321dc4

If we create a build with proguard rules disabled, it works fine.

Snack or a link to a repository

https://github.com/jerinjohnk/reanimatedTest/tree/main

Reanimated version

3.1.0

React Native version

0.71.7

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Release mode

Device

Real device

Device model

Motorola g(40) fusion

Acknowledgements

Yes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked minimal repository and App.tsx, which calls ManyScreensExample from app/src/examples/SharedElementTransitions/ManyScreens.tsx. Run npx react-native build-android --mode=release with the shown Proguard rules, then compare it with Proguard disabled. Done means shared element transitions work in the Android release build with Proguard enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, react-native, typescript
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.