react-native-unity icon indicating copy to clipboard operation
react-native-unity copied to clipboard

` Build failed with an exception` when I build for android

Open IsabelleF-Grinch opened this issue 3 years ago • 5 comments

Hi, I would like to integrate a unity scene in an android application, developed with RN.

Problem: I followed the steps for android and when launching yarn android.

Result: Capture d’écran 2022-06-08 à 13 26 51

Additional info: Same issue when I build with android studio directly.

Thank you in advance.

IsabelleF-Grinch avatar Jun 08 '22 11:06 IsabelleF-Grinch

Hi there, I am also unable to make an android build. The build gets failed with the following error:

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction 2 files found with path 'META-INF/androidx.core_core.version' from inputs: - /Users/thexdd/.gradle/caches/transforms-3/c7a27c777039b4c0b459e61365c89d71/transformed/core-1.5.0/jars/classes.jar - /Users/thexdd/.gradle/caches/transforms-3/6d7ff1427d8f8a710cdd577d8122fe54/transformed/jetified-androidx.core.core-1.0.0/jars/classes.jar Adding a packagingOptions block may help, please refer to https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html for more information 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.

daniel-keen avatar Jun 29 '22 09:06 daniel-keen

Have you looked at how the example is set up? There is a fully working example

azesmway avatar Jun 29 '22 14:06 azesmway

Have you looked at how the example is set up? There is a fully working example

image

This is what I get when trying to build the example.

daniel-keen avatar Jul 07 '22 09:07 daniel-keen

This example: https://github.com/azesmway/react-native-unity/tree/main/example Has only sources!!! You have to build a Unity project and put it as indicated in the documentation - in the unity/builds/android folder (if android version)

azesmway avatar Jul 07 '22 10:07 azesmway

This example: https://github.com/azesmway/react-native-unity/tree/main/example Has only sources!!! You have to build a Unity project and put it as indicated in the documentation - in the unity/builds/android folder (if android version)

Hi, thanks for the reply! Indeed, I forgot to make the unity build. Now it works. Thanks!

daniel-keen avatar Jul 07 '22 11:07 daniel-keen