Open lkinasiewicz opened 2 years ago
Hi @Kudo, I think you are the person I should be asking for help. I would really appreciate any tips or solutions.
@lkinasiewicz have you fixed this issue? i'm having the same
I have the same issue. 👍
I got the same issue as well. For now I just downgraded to 2.9.1, but looking for a solution for 2.10
i'm sorry to introduce the problems for v8 integration. as far as i can tell, there are two issues:
android studio Sync project with gradle files
error:
android studio will just configure gradle and cmake in this step. however, i have some lazy tasks deferring to gradle execution time. that would make syncing faster, e.g. you may not want to build v8 in this stage. the downside as you seen is the syncing error and the cpp sources are not visible in android studio.
missing libv8android.so when Run
:
this is a known issue occurred from gradle task dependencies and i'll try to fix it in the newer react-native-v8 version. in the meantime, you could try to Run
again.
Thought I'd drop some data to help everyone out. We use both react-native-reanimated@2.10.0
and react-native-v8@1.4.7
successfully in our project. We have never received any of the errors mentioned.
Here are our versions:
Android Gradle Plugin is 7.0.4
Gradle is 7.3.3
React Native is 0.68.3
Expo (bare) is 45.0.8
buildToolsVersion = "31.0.0"
minSdkVersion = 24
compileSdkVersion = 31
targetSdkVersion = 31
androidxLibVersion = "1.8.0"
In app/build.gradle make sure you have:
project.ext.reanimated = [
buildFromSource: true
]
Thank you to the authors of both of these plugins. Since the official support landed last month both reanimated and v8 have been working together flawlessly for us at Shipt.
Thought I'd drop some data to help everyone out. We use both
react-native-reanimated@2.10.0
andreact-native-v8@1.4.7
successfully in our project. We have never received any of the errors mentioned.Here are our versions:
Android Gradle Plugin is 7.0.4 Gradle is 7.3.3 React Native is 0.68.3 Expo (bare) is 45.0.8 buildToolsVersion = "31.0.0" minSdkVersion = 24 compileSdkVersion = 31 targetSdkVersion = 31 androidxLibVersion = "1.8.0"
In app/build.gradle make sure you have:
project.ext.reanimated = [ buildFromSource: true ]
Thank you to the authors of both of these plugins. Since the official support landed last month both reanimated and v8 have been working together flawlessly for us at Shipt.
Is there anything to do with Expo version pertaining to this issue?
Even with buildFromSource: true
in my build.gradle I'm getting the following for V8EXECUTOR_LIB and V8_ANDROID_LIB:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
V8EXECUTOR_LIB
linked by target "reanimated" in directory
Is there some other change I need to make to properly link in V8?
@rmdvector or anyone else who is seeing "V8EXECUTOR_LIB" as "NOTFOUND" when running gradle sync, just run a gradle build first.
This is because some heavy lifting tasks for building v8 are done during build time, but they need to be done once for the gradle sync to succeed. (Kudo explains this here)
Description
When I try to use reanimated 2 with react-native-v8, gradle sync in Android Studio fails with the following error:
Steps to reproduce
yarn
yarn start
android
directory in Android StudioSync project with gradle files
- it logs the error mentioned aboveRun app
- the application throws an exception due to missinglibv8android.so
.Notes:
yarn android
the app builds and works properly.Snack or a link to a repository
https://github.com/lkinasiewicz/reanimatedApp
Reanimated version
2.10.0
React Native version
0.70.0
Platforms
Android
JavaScript runtime
V8
Workflow
No response
Architecture
No response
Build type
No response
Device
No response
Device model
No response
Acknowledgements
Yes