-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not building in Android for React Native 76.0 new arch enabled project but works for iOS #86
Comments
👋 @Gautham495 |
Hey @Gautham495, I’ve opened a draft PR to adress this but it’s not finished yet, got sick and stopped working on it 🫤 @numandev1 can you pick up this PR and finish the remaining chages? Thanks |
diff --git a/node_modules/react-native-keys/android/CMakeLists.txt b/node_modules/react-native-keys/android/CMakeLists.txt
index f453363..8f262ec 100644
--- a/node_modules/react-native-keys/android/CMakeLists.txt
+++ b/node_modules/react-native-keys/android/CMakeLists.txt
@@ -9,6 +9,7 @@ set(BUILD_DIR ${CMAKE_SOURCE_DIR}/build)
if(${REACT_NATIVE_MINOR_VERSION} GREATER_EQUAL 71)
# Consume shared libraries and headers from prefabs
find_package(ReactAndroid REQUIRED CONFIG)
+ find_package(fbjni REQUIRED CONFIG) # Add this line to find fbjni
include_directories(
${PACKAGE_NAME}
@@ -49,7 +50,17 @@ if(${REACT_NATIVE_MINOR_VERSION} GREATER_EQUAL 71)
find_package(openssl REQUIRED CONFIG)
- target_link_libraries(
+ if (REACTNATIVE_MERGED_SO OR ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
+ target_link_libraries(
+ ${PACKAGE_NAME}
+ ${LOG_LIB}
+ ReactAndroid::reactnative
+ ReactAndroid::jsi
+ fbjni::fbjni
+ openssl::crypto
+ )
+ else()
+ target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
ReactAndroid::jsi
@@ -57,7 +68,8 @@ if(${REACT_NATIVE_MINOR_VERSION} GREATER_EQUAL 71)
ReactAndroid::react_nativemodule_core
android
openssl::crypto
- )
+ )
+ endif()
else()
add_library(
${PACKAGE_NAME} |
I confirm this is working thanks a lot. |
@efstathiosntonas could you please release a fix as i can confirm above patch is working fine. |
@tarakagilefoways I have already opened a PR about it, there’s nothing else I can do about this: #84 |
this is happening when i am adding find_package(fbjni REQUIRED CONFIG) in CMakeLists.txt
would you know way to fix this? |
add "**/libreactnative.so" to excludes in ~/react-native-keys/android/build.gradle packagingOptions {
excludes = [
"**/libc++_shared.so",
"**/libfbjni.so",
"**/libreactnative.so",
"**/libreactnativejni.so",
"**/libjsi.so",
"**/libreact_nativemodule_core.so",
"**/libturbomodulejsijni.so",
"**/MANIFEST.MF"
]
doNotStrip '**/*.so'
} and then clean the build and it should work |
Current behavior
Does not build in android and ios for new arch.
Works well in old arch
Android Error:
Expected behavior CMake Error at CMakeLists.txt:52 (target_link_libraries):
Target "react-native-keys" links to:
Platform
Android
React Native Version
76.0 - New Arch Enabled
React Native Compressor Version
Latest Version.
@numandev1 - Check it out when you have free time please.
We use both of your packages in production apps. Thanks for the great work. We are grateful for your work.
The text was updated successfully, but these errors were encountered: