You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently we migrated our app to New Architecture with React Native 0.72.1, Debug build is working fine but getting cmake error for release build with command
/bin/bash gradlew assembleRelease
Summary
Here are the build logs:
Task :app:configureCMakeRelWithDebInfo[arm64-v8a]
C/C++: CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:6 (add_subdirectory):
C/C++: add_subdirectory given source
C/C++: "/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/@react-native-community/datetimepicker/android/build/generated/source/codegen/jni/"
C/C++: which is not an existing directory.
C/C++: Call Stack (most recent call first):
C/C++: /Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
C/C++: CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:7 (add_subdirectory):
C/C++: add_subdirectory given source
C/C++: "/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/"
C/C++: which is not an existing directory.
C/C++: Call Stack (most recent call first):
C/C++: /Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
C/C++: CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:8 (add_subdirectory):
C/C++: add_subdirectory given source
C/C++: "/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-image-picker/android/build/generated/source/codegen/jni/"
C/C++: which is not an existing directory.
C/C++: Call Stack (most recent call first):
C/C++: /Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
C/C++: CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:11 (add_subdirectory):
C/C++: add_subdirectory given source
C/C++: "/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-webview/android/build/generated/source/codegen/jni/"
C/C++: which is not an existing directory.
C/C++: Call Stack (most recent call first):
C/C++: /Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
C/C++: CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:124 (target_link_libraries):
C/C++: Cannot specify link libraries for target
C/C++: "react_codegen_RNDateTimePickerCGen" which is not built by this project.
C/C++: Call Stack (most recent call first):
C/C++: CMakeLists.txt:31 (include)
What went wrong:
Execution failed for task ':app:configureCMakeRelWithDebInfo[arm64-v8a]'.
[CXX1429] error when building with cmake using /Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- The C compiler identification is Clang 12.0.8
-- The CXX compiler identification is Clang 12.0.8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/ravindragupta/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/ravindragupta/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/.cxx/RelWithDebInfo/624s2314/arm64-v8a/CMakeFiles/CMakeOutput.log".
C++ build system [configure] failed while executing:
/Users/ravindragupta/Library/Android/sdk/cmake/3.22.1/bin/cmake
-H/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_SYSTEM_VERSION=21
-DANDROID_PLATFORM=android-21
-DANDROID_ABI=arm64-v8a
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a
-DANDROID_NDK=/Users/ravindragupta/Library/Android/sdk/ndk/23.1.7779620
-DCMAKE_ANDROID_NDK=/Users/ravindragupta/Library/Android/sdk/ndk/23.1.7779620
-DCMAKE_TOOLCHAIN_FILE=/Users/ravindragupta/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake
-DCMAKE_MAKE_PROGRAM=/Users/ravindragupta/Library/Android/sdk/cmake/3.22.1/bin/ninja
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/intermediates/cxx/RelWithDebInfo/624s2314/obj/arm64-v8a
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/intermediates/cxx/RelWithDebInfo/624s2314/obj/arm64-v8a
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_FIND_ROOT_PATH=/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/.cxx/RelWithDebInfo/624s2314/prefab/arm64-v8a/prefab
-B/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/.cxx/RelWithDebInfo/624s2314/arm64-v8a
-GNinja
-DPROJECT_BUILD_DIR=/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build
-DREACT_ANDROID_DIR=/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid
-DANDROID_STL=c++_shared
-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON
from /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:6 (add_subdirectory):
add_subdirectory given source
"/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/@react-native-community/datetimepicker/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:7 (add_subdirectory):
add_subdirectory given source
"/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:8 (add_subdirectory):
add_subdirectory given source
"/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-image-picker/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:11 (add_subdirectory):
add_subdirectory given source
"/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-webview/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:124 (target_link_libraries):
Cannot specify link libraries for target
"react_codegen_RNDateTimePickerCGen" which is not built by this project.
Call Stack (most recent call first):
CMakeLists.txt:31 (include)
👋 @ravindraguptacapgemini, sorry you're having an issue. This issue is being closed because it does not provide all information required by the issue template. As the issue template explains, we require that you provide a runnable example that reproduces your issue and your environment information. This means you need to provide a code snippet that we can copy-paste into an empty project and see the error ourselves, or provide a git repository with the issue.
The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug.
Please create a new issue with this and we'll be happy to review it!
Bug report
Recently we migrated our app to New Architecture with React Native 0.72.1, Debug build is working fine but getting cmake error for release build with command
/bin/bash gradlew assembleRelease
Summary
Here are the build logs:
FAILURE: Build failed with an exception.
Execution failed for task ':app:configureCMakeRelWithDebInfo[arm64-v8a]'.
C++ build system [configure] failed while executing:
/Users/ravindragupta/Library/Android/sdk/cmake/3.22.1/bin/cmake
-H/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_SYSTEM_VERSION=21
-DANDROID_PLATFORM=android-21
-DANDROID_ABI=arm64-v8a
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a
-DANDROID_NDK=/Users/ravindragupta/Library/Android/sdk/ndk/23.1.7779620
-DCMAKE_ANDROID_NDK=/Users/ravindragupta/Library/Android/sdk/ndk/23.1.7779620
-DCMAKE_TOOLCHAIN_FILE=/Users/ravindragupta/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake
-DCMAKE_MAKE_PROGRAM=/Users/ravindragupta/Library/Android/sdk/cmake/3.22.1/bin/ninja
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/intermediates/cxx/RelWithDebInfo/624s2314/obj/arm64-v8a
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/intermediates/cxx/RelWithDebInfo/624s2314/obj/arm64-v8a
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_FIND_ROOT_PATH=/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/.cxx/RelWithDebInfo/624s2314/prefab/arm64-v8a/prefab
-B/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/.cxx/RelWithDebInfo/624s2314/arm64-v8a
-GNinja
-DPROJECT_BUILD_DIR=/Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build
-DREACT_ANDROID_DIR=/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid
-DANDROID_STL=c++_shared
-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON
from /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:6 (add_subdirectory):
add_subdirectory given source
"/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/@react-native-community/datetimepicker/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:7 (add_subdirectory):
add_subdirectory given source
"/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:8 (add_subdirectory):
add_subdirectory given source
"/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-image-picker/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/android/app/build/generated/rncli/src/main/jni/Android-rncli.cmake:11 (add_subdirectory):
add_subdirectory given source
"/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native-webview/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:121 (include)
CMakeLists.txt:31 (include)
CMake Error at /Users/ravindragupta/Desktop/Projects/mobilev2/native/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:124 (target_link_libraries):
Cannot specify link libraries for target
"react_codegen_RNDateTimePickerCGen" which is not built by this project.
Call Stack (most recent call first):
CMakeLists.txt:31 (include)
Reproducible sample code
Using the latest library version: 7.4.0
Steps to reproduce
Describe what you expected to happen:
Environment info
npx react-native info
output:datetimepicker version: 7.4.2
iOS / Android version: 13.0
The text was updated successfully, but these errors were encountered: