azesmway / react-native-unity

MIT License
268 stars 63 forks source link

Build failed for Android, Unity 2023.2.15f1, library version 1.0.10 #123

Open braginpavel opened 3 months ago

braginpavel commented 3 months ago

Hi,

Tried to build app for Android, Unity 2023.2.15f1, library version 1.0.10. Got error below:

> Task :azesmway_react-native-unity:compileDebugJavaWithJavac FAILED
/Users/paul/Documents/projects/project/node_modules/@azesmway/react-native-unity/android/src/main/java/com/azesmwayreactnativeunity/UPlayer.java:100: error: incompatible types: UnityPlayer cannot be converted to FrameLayout
            return unityPlayer;
                   ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':azesmway_react-native-unity:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 20s
329 actionable tasks: 4 executed, 325 up-to-date
Error: /Users/paul/Documents/projects/project/android/gradlew exited with non-zero code: 1
Error: /Users/paul/Documents/projects/project/android/gradlew exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/paul/Documents/projects/project/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
    ...
    at Object.spawnAsync [as default] (/Users/paul/Documents/projects/project/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at spawnGradleAsync (/Users/paul/Documents/projects/project/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:72:46)
    at Object.assembleAsync (/Users/paul/Documents/projects/project/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:52:18)
    at runAndroidAsync (/Users/paul/Documents/projects/project/node_modules/@expo/cli/build/src/run/android/runAndroidAsync.js:36:24)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
cf-moritzjaeger commented 2 months ago

I am having the same problem with Unity 6

rmethaniya commented 2 months ago

Could you please try this? Here's the link: https://github.com/byplay-io/react-native-unity.git

orjiAce commented 2 months ago

hi has anyone been able to fix the above issue?

orjiAce commented 2 months ago

Could you please try this? Here's the link: https://github.com/byplay-io/react-native-unity.git

hi please can you explain more on how to apply this solution?

orjiAce commented 1 month ago

Hi,

Tried to build app for Android, Unity 2023.2.15f1, library version 1.0.10. Got error below:

> Task :azesmway_react-native-unity:compileDebugJavaWithJavac FAILED
/Users/paul/Documents/projects/project/node_modules/@azesmway/react-native-unity/android/src/main/java/com/azesmwayreactnativeunity/UPlayer.java:100: error: incompatible types: UnityPlayer cannot be converted to FrameLayout
            return unityPlayer;
                   ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':azesmway_react-native-unity:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1m 20s
329 actionable tasks: 4 executed, 325 up-to-date
Error: /Users/paul/Documents/projects/project/android/gradlew exited with non-zero code: 1
Error: /Users/paul/Documents/projects/project/android/gradlew exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/paul/Documents/projects/project/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
    ...
    at Object.spawnAsync [as default] (/Users/paul/Documents/projects/project/node_modules/@expo/cli/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at spawnGradleAsync (/Users/paul/Documents/projects/project/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:72:46)
    at Object.assembleAsync (/Users/paul/Documents/projects/project/node_modules/@expo/cli/build/src/start/platforms/android/gradle.js:52:18)
    at runAndroidAsync (/Users/paul/Documents/projects/project/node_modules/@expo/cli/build/src/run/android/runAndroidAsync.js:36:24)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

hi did you find a solution? I'm having this same issue

orjiAce commented 1 month ago

I am having the same problem with Unity 6

hi did you find a solution?

cf-moritzjaeger commented 1 month ago

Sadly not yet. I progressed with my project in Unity 2022 for now.

orjiAce commented 1 month ago

@azesmway hi guys please help with this, thanks

alexboyer commented 1 week ago

Sadly not yet. I progressed with my project in Unity 2022 for now.

Did this solve the issue for you? We're seeing the same error using 2023.

douglasndm commented 6 days ago

Sadly not yet. I progressed with my project in Unity 2022 for now.

So is it working for you on Unity 2022?

cf-moritzjaeger commented 5 days ago

Sadly not yet. I progressed with my project in Unity 2022 for now.

So is it working for you on Unity 2022?

Yes, because the problem is caused by a change made in Unity 2023 (and onwards)