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

RN 0.75 New Architecture build android error #52

Open
mikeky-koizora opened this issue Aug 30, 2024 · 4 comments
Open

RN 0.75 New Architecture build android error #52

mikeky-koizora opened this issue Aug 30, 2024 · 4 comments

Comments

@mikeky-koizora
Copy link

I don't know if there will be a development plan to support this.

@hengkx
Copy link

hengkx commented Aug 30, 2024

same error

@itsnyx
Copy link

itsnyx commented Sep 12, 2024

++same

@RdnSam
Copy link

RdnSam commented Sep 15, 2024

same here, when enable new arch error in CMake

* What went wrong:
Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/mac/Desktop/bugHunter/android/app/.cxx/Debug/6n123n60/arm64-v8a'
  [0/2] Re-checking globbed directories...
  [1/2] Re-running CMake...
  -- Configuring incomplete, errors occurred!
  See also "/Users/mac/Desktop/bugHunter/android/app/.cxx/Debug/6n123n60/arm64-v8a/CMakeFiles/CMakeOutput.log".
  See also "/Users/mac/Desktop/bugHunter/android/app/.cxx/Debug/6n123n60/arm64-v8a/CMakeFiles/CMakeError.log".
  FAILED: build.ninja
  /Users/mac/Library/Android/sdk/cmake/3.22.1/bin/cmake --regenerate-during-build -S/Users/mac/Desktop/bugHunter/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup -B/Users/mac/Desktop/bugHunter/android/app/.cxx/Debug/6n123n60/arm64-v8a

  C++ build system [build] failed while executing:
      /Users/mac/Library/Android/sdk/cmake/3.22.1/bin/ninja \
        -C \
        /Users/mac/Desktop/bugHunter/android/app/.cxx/Debug/6n123n60/arm64-v8a \
        appmodules \
        react-native-mmkv \
        react_codegen_RNCGeolocationSpec \
        react_codegen_RNCWebViewSpec \
        react_codegen_RNDatePickerSpecs \
        react_codegen_RNImagePickerSpec \
        react_codegen_RNMmkvSpec \
        react_codegen_RNPermissionsSpec \
        react_codegen_RNVectorIconsSpec \
        react_codegen_lottiereactnative \
        react_codegen_rnasyncstorage \
        react_codegen_rngesturehandler_codegen \
        react_codegen_rnpicker \
        react_codegen_rnreanimated \
        react_codegen_rnscreens \
        react_codegen_rnsvg \
        react_codegen_safeareacontext
    from /Users/mac/Desktop/bugHunter/android/app
  CMake Error at /Users/mac/Desktop/bugHunter/android/app/build/generated/autolinking/src/main/jni/Android-autolinking.cmake:24 (add_subdirectory):
    add_subdirectory given source
    "/Users/mac/Desktop/bugHunter/node_modules/react-native-screenshot-prevent/android/build/generated/source/codegen/jni/"
    which is not an existing directory.
  Call Stack (most recent call first):
    /Users/mac/Desktop/bugHunter/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:135 (include)
    CMakeLists.txt:31 (include)


  CMake Error at /Users/mac/Desktop/bugHunter/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:138 (target_link_libraries):
    Cannot specify link libraries for target
    "react_codegen_RNScreenshotPreventSpec" which is not built by this project.
  Call Stack (most recent call first):
    CMakeLists.txt:31 (include)


  ninja: error: rebuilding 'build.ninja': subcommand failed

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 45s
info Run CLI with --verbose flag for more details.

@batuhanoztrk
Copy link

I encountered the same issue while working with the New Architecture in React Native 0.75, specifically the error related to react_codegen_RNScreenshotPreventSpec. To resolve this, I created a package that addresses this issue: rn-screenshot-prevent. This package prevents the screenshot-related errors during the build process. You can give it a try and see if it helps fix the CMake errors you're facing. Let me know if you run into any issues!

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

5 participants