Kudo/react-native-v8

libfolly_runtime.so and the 2 files found with path 'lib/arm64-v8a/libfolly_runtime.so' issue

zyc opened this issue · 1 comments

zyc commented

After upgrading to Expo 46, RN 0.69 and react-native-v8 1.4.7 I got the "2 files found with path" error on the project build using EAS.

Please folks, take a look at my package.json file:

{
  "scripts": {
    "start": "expo start --dev-client",
    "prod": "expo start --no-dev --minify",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "^1.17.10",
    "@react-native-community/netinfo": "^9.3.0",
    "@react-native-community/segmented-control": "^2.2.2",
    "@react-native-picker/picker": "2.4.2",
    "@react-navigation/bottom-tabs": "^6.3.3",
    "@react-navigation/drawer": "^6.4.4",
    "@react-navigation/elements": "^1.3.5",
    "@react-navigation/material-bottom-tabs": "^6.2.3",
    "@react-navigation/material-top-tabs": "^6.2.3",
    "@react-navigation/native": "^6.0.12",
    "@react-navigation/native-stack": "^6.8.0",
    "@react-navigation/stack": "^6.2.3",
    "axios": "^0.27.2",
    "expo": "^46.0.10",
    "expo-application": "^4.2.2",
    "expo-asset": "^8.6.1",
    "expo-av": "^12.0.4",
    "expo-blur": "^11.2.0",
    "expo-build-properties": "^0.3.0",
    "expo-clipboard": "^3.1.0",
    "expo-device": "^4.3.0",
    "expo-file-system": "^14.1.0",
    "expo-firebase-analytics": "^7.1.1",
    "expo-haptics": "^11.3.0",
    "expo-keep-awake": "^10.2.0",
    "expo-linear-gradient": "^11.4.0",
    "expo-linking": "^3.2.2",
    "expo-localization": "^13.1.0",
    "expo-notifications": "^0.16.1",
    "expo-splash-screen": "^0.16.2",
    "expo-sqlite": "^10.3.0",
    "expo-status-bar": "^1.4.0",
    "expo-updates": "^0.14.5",
    "firebase": "^9.9.4",
    "is_js": "^0.9.0",
    "jwt-decode": "^3.1.2",
    "lodash": "^4.17.21",
    "lottie-react-native": "5.1.3",
    "moment": "^2.29.4",
    "numeral": "^2.0.6",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.5",
    "react-native-currency-input": "^1.0.1",
    "react-native-event-listeners": "^1.0.7",
    "react-native-flash-message": "^0.3.1",
    "react-native-pager-view": "5.4.24",
    "react-native-paper": "^4.12.4",
    "react-native-paper-tabs": "^0.7.0",
    "react-native-picker-select": "^8.0.4",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-tab-view": "^3.1.1",
    "react-native-v8": "^1.4.7",
    "react-use-websocket": "^4.2.0",
    "react-usestateref": "^1.0.8",
    "tinycolor2": "^1.4.2",
    "v8-android-jit": "^10.100.1"
  },
  "devDependencies": {
    "@babel/core": "^7.19.0",
    "babel-eslint": "^10.1.0",
    "babel-plugin-transform-modern-regexp": "^0.0.6",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "babel-preset-expo": "^9.2.0",
    "eslint": "^8.23.0",
    "eslint-config-airbnb": "^19.0.4",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-jsx-a11y": "^6.6.1",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-react": "^7.31.7",
    "eslint-plugin-react-hooks": "^4.6.0",
    "prettier": "^2.7.1",
    "yarn-upgrade-all": "^0.7.1"
  },
  "private": true,
  "name": "workshift",
  "version": "1.0.0"
}

And the gradle build output:

[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseNativeLibs'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
[stderr]    > 2 files found with path 'lib/arm64-v8a/libfolly_runtime.so' from inputs:
[stderr]       - /home/expo/workingdir/build/node_modules/react-native-v8/android/build/intermediates/library_jni/release/jni/arm64-v8a/libfolly_runtime.so
[stderr]       - /home/expo/.gradle/caches/transforms-3/da6d636c6642f2a9315d85ac9df2adbf/transformed/jetified-react-native-0.69.5-release/jni/arm64-v8a/libfolly_runtime.so
[stderr]      If you are using jniLibs and CMake IMPORTED targets, see
[stderr]      https://developer.android.com/r/tools/jniLibs-vs-imported-targets
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 13m 37s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

There was a similar problem with the react-native-reanimated and the react-native-vision-camera projects with the RN 0.69 version, but them have already fixed.

Have someone did a workarround for this until the official solution come out? Thanks!

zyc commented

Similar issue in react-native-v8 1.5.0 version as reported here: #144