Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

after libary install facing below issue #6752

Closed
saifalitai opened this issue Jun 24, 2024 · 4 comments
Closed

after libary install facing below issue #6752

saifalitai opened this issue Jun 24, 2024 · 4 comments
Assignees
Labels
O-Community T-Outdated Issue is likely not relevant anymore. Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@saifalitai
Copy link

saifalitai commented Jun 24, 2024

after libary install facing below issue
"@realm/react": "^0.8.0",
"realm": "^12.11.0",
"react-native": "0.66.5",

FAILURE: Build failed with an exception.

  • Where:
    Build file 'react-native/src/node_modules/realm/binding/android/build.gradle'

  • What went wrong:
    Could not compile build file '/Users/saif/Documents/Builder/dhpapp-285028-react-native/src/node_modules/realm/binding/android/build.gradle'.

startup failed:
General error during class generation: null. BuildScript

groovy.lang.GroovyRuntimeException: null. BuildScript

at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: org.codehaus.groovy.syntax.SyntaxException: Operator ("===" at 34:30: "===" ) not supported @ line 34, column 30.
at org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.eval(BinaryExpressionHelper.java:301)
... 258 more

1 error

Originally posted by @saifalitai in #6750 (comment)

Copy link

sync-by-unito bot commented Jun 24, 2024

➤ PM Bot commented:

Jira ticket: RJS-2845

@kraenhansen
Copy link
Member

This error seems related to an outdated version of Groovy (=== was introduced in 3.0.0 according to https://docs.groovy-lang.org/latest/html/documentation/core-operators.html), caused by an outdated Gradle / Groovy version related to the RN version.

You can try patching

return File.separatorChar === '/' as char ? filePath : filePath.replace(File.separatorChar, '/' as char)
to use a double equal == instead of ===. If it works we'd be happy to accept at PR for that.

 return File.separatorChar == '/' as char ? filePath : filePath.replace(File.separatorChar, '/' as char) 

@kraenhansen kraenhansen self-assigned this Jun 25, 2024
@kraenhansen kraenhansen added T-Outdated Issue is likely not relevant anymore. Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Jun 25, 2024
@saifalitai
Copy link
Author

after the above fix apply facing below issue

Task :realm:generateJsonModelDebug FAILED

Execution failed for task ':app:mergeDebugAssets'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.facebook.react:react-android:.
Required by:
project :app > project :realm

     * Exception is:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugAssets'.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.facebook.react:react-android:.
Required by:
project :app > project :realm

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Jun 25, 2024
@kneth
Copy link
Contributor

kneth commented Jul 1, 2024

Please provide a minimal project which can reproduce the issue.

@sync-by-unito sync-by-unito bot added Waiting-For-Reporter Waiting for more information from the reporter before we can proceed and removed Needs-Attention Reporter has responded. Review comment. labels Jul 1, 2024
@nirinchev nirinchev closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
@sync-by-unito sync-by-unito bot closed this as completed Aug 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Community T-Outdated Issue is likely not relevant anymore. Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

No branches or pull requests

4 participants