Closed Betapig1 closed 3 years ago
After following the documentation I am running into this error
describe the problem in more detail
there really isn't much more detail I can give
there really isn't much more detail I can give
What version of the UNITY did you use to export the project?
I apologize I was working with the wrong package. I reset up your package and this is the correct error. And it should be the newest one. Although there wasn't really any documentation on how to add the unity project, like where in the file structure. As well as for rn there is no unity project in the rn project. I'm just trying to get it to build
you need to clear all caches in android studio. I sometimes had this - after deleting and cleaning the project, everything was collected
So I made the folder, added in the unity project and cleaned the project, but now i'm getting this error
Which i just realize is the same error
What version of the UNITY did you use to export the project?
2020.3.12
Did you do everything as indicated in the documentation?
Everything
Would you be able to send over a working demo? That might actually help a lot
Now I will try to build a project from scratch and deploy it for android. How everything will be ready - I will publish it and send a link
do you use expo or not?
I do not use expo
Also right now I'm testing on android
Also right now I'm testing on android
https://github.com/azesmway/unity/tree/master
I create new react-native project did everything according to the documentation
so I installed all the node modules with yarn, and came up with this error
`FAILURE: Build failed with an exception.
Could not resolve all artifacts for configuration ':react-native-unity-play:classpath'. Could not find com.android.tools.build:gradle:4.1.3. Searched in the following locations:
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.pom If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration. Required by: project :react-native-unity-play `
Yes, this my bug))) need change node_modules/react-native-unity-play/android/build.gradle
buildscript {
repositories {
mavenCentral()
google()
jcenter()
}
Now I am having the same bug as before `FAILURE: Build failed with an exception.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. Could not resolve project :unityLibrary. Required by: project :app project :app > project :react-native-unity-play No matching configuration of project :unityLibrary was found. The consumer was configured to find a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but:
- None of the consumable configurations have attributes. `
How did you get the "builds" folder?
I apologize I figured that out, however I am getting a new and much bigger error
`Note: C:\Users\rynah\Desktop\unity-master\unity\builds\android\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar: D8: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex
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.
Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex
at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:119)
at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102)
at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:432)
at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:242)
at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:57)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:67)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:63)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:63)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:60)
at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:200)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex
at Version.fakeStackEntry(Version_2.1.86.java:0)
at com.android.tools.r8.utils.Y.a(SourceFile:78)
at com.android.tools.r8.D8.run(D8.java:11)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117)
... 36 more
Caused by: com.android.tools.r8.utils.b: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex
at com.android.tools.r8.utils.T0.error(SourceFile:1)
at com.android.tools.r8.utils.T0.a(SourceFile:2)
at com.android.tools.r8.utils.R0.b(SourceFile:6)
at com.android.tools.r8.utils.R0.a(SourceFile:24)
at com.android.tools.r8.utils.R0.a(SourceFile:10)
at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
at com.android.tools.r8.utils.R0.a(SourceFile:6)
at com.android.tools.r8.graph.Q0$c.f(SourceFile:3)
at com.android.tools.r8.dex.a.a(SourceFile:298)
at com.android.tools.r8.dex.a.a(SourceFile:226)
at com.android.tools.r8.D8.d(D8.java:6)
at com.android.tools.r8.D8.b(D8.java:1)
at com.android.tools.r8.utils.Y.a(SourceFile:36)
... 38 more
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:mergeExtDexDebug'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade 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. Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex
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
BUILD FAILED in 25s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: C:\Users\rynah\Desktop\unity-master\unity\builds\android\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar: D8: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex
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.
Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex
at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:119)
at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102)
at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:432)
at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:242)
at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:57)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:67)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:63)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:63)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:60)
at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:200)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex
at Version.fakeStackEntry(Version_2.1.86.java:0)
at com.android.tools.r8.utils.Y.a(SourceFile:78)
at com.android.tools.r8.D8.run(D8.java:11)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117)
... 36 more
Caused by: com.android.tools.r8.utils.b: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex
at com.android.tools.r8.utils.T0.error(SourceFile:1)
at com.android.tools.r8.utils.T0.a(SourceFile:2)
at com.android.tools.r8.utils.R0.b(SourceFile:6)
at com.android.tools.r8.utils.R0.a(SourceFile:24)
at com.android.tools.r8.utils.R0.a(SourceFile:10)
at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
at com.android.tools.r8.utils.R0.a(SourceFile:6)
at com.android.tools.r8.graph.Q0$c.f(SourceFile:3)
at com.android.tools.r8.dex.a.a(SourceFile:298)
at com.android.tools.r8.dex.a.a(SourceFile:226)
at com.android.tools.r8.D8.d(D8.java:6)
at com.android.tools.r8.D8.b(D8.java:1)
at com.android.tools.r8.utils.Y.a(SourceFile:36)
... 38 more
FAILURE: Build failed with an exception.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade 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. Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex`
This is a more updated bug
48 actionable tasks: 5 executed, 43 up-to-date Note: C:\Users\rynah\Desktop\unity-master\node_modules\react-native-unity-play\android\src\main\java\com\azesmway\rnunity\UnityReactActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar: D8: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132) at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:119) at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102) at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:432) at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:242) at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:57) at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:67) at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:63) at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97) at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:63) at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76) at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:60) at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:200) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.lang.Thread.run(Thread.java:748) Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex at Version.fakeStackEntry(Version_2.1.86.java:0) at com.android.tools.r8.utils.Y.a(SourceFile:78) at com.android.tools.r8.D8.run(D8.java:11) at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117) ... 36 more Caused by: com.android.tools.r8.utils.b: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex at com.android.tools.r8.utils.T0.error(SourceFile:1) at com.android.tools.r8.utils.T0.a(SourceFile:2) at com.android.tools.r8.utils.R0.b(SourceFile:6) at com.android.tools.r8.utils.R0.a(SourceFile:24) at com.android.tools.r8.utils.R0.a(SourceFile:10) at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990) at com.android.tools.r8.utils.R0.a(SourceFile:6) at com.android.tools.r8.graph.Q0$c.f(SourceFile:3) at com.android.tools.r8.dex.a.a(SourceFile:298) at com.android.tools.r8.dex.a.a(SourceFile:226) at com.android.tools.r8.D8.d(D8.java:6) at com.android.tools.r8.D8.b(D8.java:1) at com.android.tools.r8.utils.Y.a(SourceFile:36) ... 38 more
Note: C:\Users\rynah\Desktop\unity-master\android\app\src\debug\java\com\unity\ReactNativeFlipper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:mergeExtDexDebug'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
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
BUILD FAILED in 6s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 Note: C:\Users\rynah\Desktop\unity-master\node_modules\react-native-unity-play\android\src\main\java\com\azesmway\rnunity\UnityReactActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar: D8: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132) at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:119) at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102) at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:432) at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:242) at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:57) at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:67) at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:63) at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97) at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:63) at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76) at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:60) at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:200) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.lang.Thread.run(Thread.java:748) Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex at Version.fakeStackEntry(Version_2.1.86.java:0) at com.android.tools.r8.utils.Y.a(SourceFile:78) at com.android.tools.r8.D8.run(D8.java:11) at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117) ... 36 more Caused by: com.android.tools.r8.utils.b: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex at com.android.tools.r8.utils.T0.error(SourceFile:1) at com.android.tools.r8.utils.T0.a(SourceFile:2) at com.android.tools.r8.utils.R0.b(SourceFile:6) at com.android.tools.r8.utils.R0.a(SourceFile:24) at com.android.tools.r8.utils.R0.a(SourceFile:10) at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990) at com.android.tools.r8.utils.R0.a(SourceFile:6) at com.android.tools.r8.graph.Q0$c.f(SourceFile:3) at com.android.tools.r8.dex.a.a(SourceFile:298) at com.android.tools.r8.dex.a.a(SourceFile:226) at com.android.tools.r8.D8.d(D8.java:6) at com.android.tools.r8.D8.b(D8.java:1) at com.android.tools.r8.utils.Y.a(SourceFile:36) ... 38 more
Note: C:\Users\rynah\Desktop\unity-master\android\app\src\debug\java\com\unity\ReactNativeFlipper.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:mergeExtDexDebug'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Type bitter.jnibridge.JNIBridge$a is defined multiple times: C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\1_jetified-unity-classes.jar:classes.dex, C:\Users\rynah\Desktop\unity-master\android\app\build\intermediates\external_file_lib_dex_archives\debug\0_jetified-unity-classes.jar:classes.dex Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
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
BUILD FAILED in 6s
at makeError (C:\Users\rynah\Desktop\unity-master\node_modules\execa\index.js:174:9)
at C:\Users\rynah\Desktop\unity-master\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async runOnAllDevices (C:\Users\rynah\Desktop\unity-master\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Users\rynah\Desktop\unity-master\node_modules\@react-native-community\cli\build\index.js:186:9)
info Run CLI with --verbose flag for more details.
Okay so now I can build, however it says that it is unable to initialize because of unsupported hardware, failed to load libmain.so
You can try to add such a block
android/app/build.gradle
android {
....
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
packagingOptions {
doNotStrip '*/armeabi-v7a/*.so'
doNotStrip '*/arm64-v8a/*.so'
}
So that's added and its still generating the same error
I got a game loaded! Thank you so much, however I will be opening a new issue because of a new bug I found
After following the documentation I am running into this error