D8: Program type already present: androidx.renderscript.Allocation$1

303 views Asked by At

I have a react-native application, using RN 0.62.2, that is working properly. When trying to use hermes instead of JSC, I am getting the following error during build:

D8: Program type already present: androidx.renderscript.Allocation$1
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Program type already present: androidx.renderscript.Allocation$1
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.

Any idea what to do?

1

There are 1 answers

0
Marian Beuther On BEST ANSWER

Have you tried running cd android && ./gradlew clean after switching from jsc to hermes, as the docs suggest (https://reactnative.dev/docs/hermes)?