realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.67k stars 561 forks source link

after libary install facing below issue #6752

Open saifalitai opened 1 week ago

saifalitai commented 1 week ago

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.

Originally posted by @saifalitai in https://github.com/realm/realm-js/issues/6750#issuecomment-2186678656

sync-by-unito[bot] commented 1 week ago

➤ PM Bot commented:

Jira ticket: RJS-2845

kraenhansen commented 1 week ago

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 https://github.com/realm/realm-js/blob/1b24533db033d1cae13f2da62c3cb081cddb44e6/packages/realm/binding/android/build.gradle#L34 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) 
saifalitai commented 1 week ago

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

kneth commented 2 days ago

Please provide a minimal project which can reproduce the issue.