Skip to content
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

[Expo SDK 52][Android] failing with CMake Error at CMakeLists.txt:30 (add_library): #324

Open
sairanjit opened this issue Nov 24, 2024 · 4 comments
Assignees

Comments

@sairanjit
Copy link

After adding the @hyperledger/aries-askar-react-native facing issue in building the package in expo version 52 in android

CMake Error at CMakeLists.txt:30 (add_library):
    Target "ariesaskarreactnative" links to target
    "ReactAndroid::reactnativejni" but the target was not found.  Perhaps a
    find_package() call is missing for an IMPORTED target, or an ALIAS target
    is missing?
@sairanjit
Copy link
Author

I was able to debug and make a change to fix this issue but not sure it is the best way

diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt
index 74b6aff9c7cf062724475a58b9030f655a939e18..b5d9a79eee3f0d0199b109f701a7006ed05fb646 100644
--- a/android/CMakeLists.txt
+++ b/android/CMakeLists.txt
@@ -90,8 +90,9 @@ endif()
 if(${REACT_NATIVE_VERSION} GREATER_EQUAL 71)
   target_link_libraries(
     ${PACKAGE_NAME}
+    ReactAndroid::reactnative
     ReactAndroid::jsi
-    ReactAndroid::reactnativejni
+    # ReactAndroid::reactnativejni
     fbjni::fbjni
   )
 elseif(${REACT_NATIVE_VERSION} LESS 66)
@@ -121,8 +122,8 @@ find_library(
 
 
 find_library(
-  ASKAR_LIB 
-  aries_askar 
+  ASKAR_LIB
+  aries_askar
   paths ${LIBASKAR_DIR}
   NO_CMAKE_FIND_ROOT_PATH
 )

@swcurran
Copy link
Contributor

@cvarjao — can you or someone on your team look at this?

@swcurran
Copy link
Contributor

Adding @berendsliedrecht in case someone at Animo can look at this.

@cvarjao
Copy link

cvarjao commented Nov 25, 2024

Expo 52 comes with RN 0.76 where a whole new architecture is being enabled by default. So, I believe askar and/or the wrapper will need some tweak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants