I want to run my project on physical device. However while I run android Build failed. then getting an error.
Task :app:transformDexArchiveWithDexMergerForDebug FAILED
C:\Users\Alperen\Desktop\AwesomeProject>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 885 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...> Task :app:transformDexArchiveWithDexMergerForDebug FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
36 actionable tasks: 2 executed, 34 up-to-date
D8: Program type already present: com.zmxv.RNSound.BuildConfig
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: com.zmxv.RNSound.BuildConfig
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:66)
... 11 more
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: com.zmxv.RNSound.BuildConfig
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BU�LD FAILED in 7s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
D8: Program type already present: com.zmxv.RNSound.BuildConfig
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
NOTE:
I am using 11. verison of jdk.
It's just a hello world project.
yesterday I builded smoothly for apk.
How can I fix that problem ?