Версия React Native: 0.82.1
Версия реакции-native-pager-view: 6.9.1
Платформа: только Android
Новая архитектура: true
Описание
Код: Выделить всё
Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.
> [CXX1429] error when building with cmake using /node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- The C compiler identification is Clang 18.0.2
-- The CXX compiler identification is Clang 18.0.2
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Android/sdk/ndk/27.1.12297006/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: /Android/sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also /android/app/.cxx/Debug/3q6iz5w5/arm64-v8a/CMakeFiles/CMakeOutput.log".
See also "/android/app/.cxx/Debug/3q6iz5w5/arm64-v8a/CMakeFiles/CMakeError.log".
C++ build system [configure] failed while executing:
/Android/sdk/cmake/3.22.1/bin/cmake \
-H/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_SYSTEM_VERSION=26 \
-DANDROID_PLATFORM=android-26 \
-DANDROID_ABI=arm64-v8a \
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
-DANDROID_NDK=/Android/sdk/ndk/27.1.12297006 \
-DCMAKE_ANDROID_NDK=/Android/sdk/ndk/27.1.12297006 \
-DCMAKE_TOOLCHAIN_FILE=/Android/sdk/ndk/27.1.12297006/build/cmake/android.toolchain.cmake \
-DCMAKE_MAKE_PROGRAM=/Android/sdk/cmake/3.22.1/bin/ninja \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/android/app/build/intermediates/cxx/Debug/3q6iz5w5/obj/arm64-v8a \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/android/app/build/intermediates/cxx/Debug/3q6iz5w5/obj/arm64-v8a \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_FIND_ROOT_PATH=/android/app/.cxx/Debug/3q6iz5w5/prefab/arm64-v8a/prefab \
-B/android/app/.cxx/Debug/3q6iz5w5/arm64-v8a \
-GNinja \
-DPROJECT_BUILD_DIR=/android/app/build \
-DPROJECT_ROOT_DIR=/android \
-DREACT_ANDROID_DIR=/node_modules/react-native/ReactAndroid \
-DANDROID_STL=c++_shared \
-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON
from /android/app
CMake Error at /android/app/build/generated/autolinking/src/main/jni/Android-autolinking.cmake:29 (add_subdirectory):
add_subdirectory given source
"/node_modules/react-native-pager-view/android/build/generated/source/codegen/jni/"
which is not an existing directory.
Call Stack (most recent call first):
/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:94 (include)
CMakeLists.txt:31 (include)
CMake Error at /node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:97 (target_link_libraries):
Cannot specify link libraries for target "react_codegen_pagerview" which is
not built by this project.
Call Stack (most recent call first):
CMakeLists.txt:31 (include) : com.android.ide.common.process.ProcessException: -- The C compiler identification is Clang 18.0.2
- Удалить node_modules, Yarn.lock, app/.cxx, app/build
- ./gradlew clean, ./gradlew генерироватьCodegenArtifactsFromSchema --rerun-tasks
Воспроизводимая демонстрация
Это команда, которую мы использовали для сборки:
- react-native run-android
- ./gradlew assembleDebug
Подробнее здесь: https://stackoverflow.com/questions/797 ... ich-is-not
Мобильная версия