question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android R8: Type com.swmansion.reanimated.BuildConfig is defined multiple times after upgrading to 2.3.0

See original GitHub issue

Description

We are getting Type com.swmansion.reanimated.BuildConfig is defined multiple times when executing the task :app:minifyReleaseWithR8.

This started happening after upgrading to v2.3.0 from v2.3.0-beta.4 - which was working fine. We are using expo modules and we were getting this issue #2707 but that was fixed after upgrading to expo v43.0.4

Conflicting files: */.gradle/caches/transforms-3/de89dd491315155bcf462fb6bb0d5335/transformed/jetified-react-native-reanimated-66-hermes-runtime.jar:com/swmansion/reanimated/BuildConfig.class */node_modules/react-native-reanimated/android/build/intermediates/runtime_library_classes_jar/release/classes.jar:com/swmansion/reanimated/BuildConfig.class

Expected behavior

Able to build a minified release.

Actual behavior & steps to reproduce

Build failure.

Snack or minimal code example

Package versions

  • React Native: 0.66.3
  • React Native Reanimated: 2.3.0
  • NodeJS: 16.13.0
  • Xcode: 13.1
  • Java & Gradle: 15.0.1 & 6.9
  • Expo: 43.0.4

Affected platforms

  • Android
  • iOS
  • Web

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
Kudocommented, Dec 8, 2021

it’s my bad! will create a pr addressing this. thanks!

2reactions
MingaudasVagoniscommented, Dec 12, 2021

@riamon-v you can apply a patch with patch-package until the changes are released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type BuildConfig is defined multiple times - Stack Overflow
I get the error after upgrading the firebase project level dependency on the android project classpath 'com.
Read more >
Android : Type BuildConfig is defined multiple times - YouTube
Android : Type BuildConfig is defined multiple times [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Android : Type ...
Read more >
no aar for react-native-reanimated found. attempting to build ...
When I build my app for android it failed after installing react-native-reanimated v2.3.0-beta.2 The main error line is > Transform's input file does...
Read more >
Stop generating the BuildConfig on your Android modules
BuildConfig is generated as a Java file. But having a module with mixed Java & Kotlin code impacts on build speed. You can...
Read more >
Duplicate class issues reported by R8 [223365583]
Import the attached project in Android Studio; Connect an Android device of API 29; Click the run button; Check the APK in app/build/intermediates/apk/debug/app ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found