[Android] Fixing Libjsc.so not Found with hermes engine true #2455
See original GitHub issuecc @bmunkholm (sorry, i’m not following the issue template, since this is a fixing of https://github.com/realm/realm-js/issues/2455)
https://github.com/realm/realm-js/issues/2455 is locked i can’t add a new comment there,
but i’m able to get realm working with hermes enabled,
Fixing https://github.com/facebook/react-native/issues/25537#issuecomment-509180637 : open build.gradle (app/build.gradle) and add following code:
def useIntlJsc = false
and in dependencies add following code:
if (useIntlJsc) {
implementation 'org.webkit:android-jsc-intl:+'
} else {
implementation 'org.webkit:android-jsc:+'
}
Screenshot :
snippet:
const info = this.state.realm
? 'Number of dogs in this Realm: ' + this.state.realm.objects('Dog').length
: 'Loading...';
console.log('info' , info)
const isHermes = () => global.HermesInternal !== null
console.log('hermes' , isHermes())
PS : I don’t know what caused issue when i’m add useIntlJsc
in the future, becaused i’m not expeert about it, but now i can add realm with hermes enabled without any error (libjsc.so not found error)
ENV: node : v10.19.0 npm : 6.13.4 “react-native”: “0.61.5”, “realm”: “^5.0.3”
EDIT: I’ve tested in debug
mode, when i tried to tested in release
mode i get the following error:
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Edit your project/android/app/build.gradle from
to
@binbinla It is not part of the plan right now but we are going into quarterly planning right now and will consider it - unfortunately it is a large amount of work - you can follow #2455 for updates