EAS Android build failure after Reanimated downgrade

Hey friends! I downgraded Reanimated from 2.3.1 to 2.3.0 and since then my Android builds have been failing: Type com.swmansion.reanimated.BuildConfig is defined multiple times: /root/workingdir/build/node_modules/react-native-reanimated/android/build/.transforms/05f44862a1cb0d0087111930e4def665/transformed/classes/classes.dex, /root/workingdir/build/android/app/build/intermediates/external_libs_dex/release/mergeExtDexRelease/classes2.dex`

I’ve tried to break the cache with a new cache key but to no avail. The iOS build (and any build prior to the downgrade) ran fine. Any suggestions?

Thanks!

2.3.0 contains a bug that results in the error that you are seeing. you will need to use 2.3.1, or manually pull in this patch to your node_modules [expo] fix duplicated BuildConfig error in release build by Kudo · Pull Request #2713 · software-mansion/react-native-reanimated · GitHub

Thanks. 2.3.1 introduces bugs in LayoutAnimation. I’m stuck between a rock and a hard place :slight_smile:

are you sure those would be resolved in 2.3.0? there are no related commits between 2.3.0 and 2.3.1 Commits · software-mansion/react-native-reanimated · GitHub

Yeah. Bizarrely 2.3.1 breaks conditional rendering. Attaching a screenshot (see the second item is missing a title). I can fix it by either removing the LayoutAnimation, or by downgrading to 2.3.0.

strange, can you trace that back to any commit in the commit history i sent you?

I take that back. Was debugging 2 things at the same time and 2.3.1 was just a victim. 2.3.1 is fine. LayoutAnimation in Expo 44, and specifically the delete configuration, breaks the conditional rendering. Removing it fixes all of my issues (which includes the title in the screenshot not rendering, and the screens freezing on Android when used with RN Animated).