Closed terfender closed 3 years ago
modify android/build.gradle
maven {
@dcboy already did, but still facing same issue.
allprojects {
repositories {
mavenLocal()
maven {
// Replace AAR from original RN with AAR from react-native-v8
url("$rootDir/../node_modules/react-native-v8/dist")
}
maven {
// prebuilt libv8android.so
url("$rootDir/../node_modules/v8-android-jit-nointl/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}
It seems to be related to reanimated2. Since reanimated2 also had a native share library and it may not support V8, I will take a look tomorrow and try to find some solutions.
Thanks @Kudo , confirming I am using reanimated2
"react-native-reanimated": "2.0.0-alpha.7",
@Terfender From the reanimated2 document, they said only Hermes is supported in the meantime. https://github.com/software-mansion/react-native-reanimated/blob/master/docs/docs/about.md#known-problems-and-limitations
The fact is that reanimated2 requires JSI and shipped with prebuilt AAR and shared libraries - libreanimated.so and libturbomodulejsijni.so. libreanimated.so was built from a Hermes enabled environment and it requires libhermes.so in runtime.
$ /path/to/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/aarch64-linux-android-readelf -d jni/arm64-v8a/libreanimated.so | grep hermes
0x0000000000000001 (NEEDED) Shared library: [libhermes.so]
That's why the crash happens when loading libreanimated.so.
The possibly solution would be building from source code and it requires some patch in react-native-reanimated.
Oww. That's unfortunate, but thanks a lot for looking into this. I hope there will be an easy patch for all libs/packages in the future to opt-in v8.
Closing the issue now.
With more and more C++ native code involved, shipping with prebuilt AAR in react-native is not flexible. Maybe in the future we will all build from source. Otherwise C++ ABI stability is necessary.
Hi, I am getting an error cuz of hermes.
app/build.gradle
Related packages:
Any ideas how to disable it so I can use
v8-android-jit-nointl
?Thanks in advance.