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

[React Native 0.76.2] Android bundle build failing while using new architecture. #2273

Open
2 tasks done
einjunge99 opened this issue Dec 10, 2024 · 0 comments
Open
2 tasks done

Comments

@einjunge99
Copy link

Describe the bug

Created a new project and followed the manual setup guide. App works fine on emulator/physical device, but when I try to build it, it throws the following error:

Execution failed for task ':app:configureCMakeRelWithDebInfo[arm64-v8a]'.

Upon further inspection, as the logs attached below states, no /Users/isaacmaldonado/Documents/Projects/Template/node_modules/@bugsnag/react-native/android/build/generated/source/codegen/jni/ were generated.

Steps to reproduce

  1. Create new react native project with npx @react-native-community/cli@latest init <APP_NAME> --version 0.76.2
  2. Follow react native manual setup guide
  3. cd android folder and run ./gradlew bundleRelease
  4. See error

Environment

  • MacOS (M1)
  • Bugsnag version: 8.1.3
  • NodeJS: 20.15.1
  • Java: zulu-17.46.19

Example Repo

  • Create a minimal repository that can reproduce the issue
  • Link to it here: https://github.com/einjunge99/template (Remember to replace YOUR_BUGSNAG_API_KEY with your own Bugsnag API key on android/app/src/main/AndroidManifest.xml)
Error messages:
> Task :app:configureCMakeDebug[arm64-v8a] FAILED
C/C++: CMake Error at /Users/isaacmaldonado/Documents/Projects/Template/android/app/build/generated/autolinking/src/main/jni/Android-autolinking.cmake:9 (add_subdirectory):
C/C++:   add_subdirectory given source
C/C++:   "/Users/isaacmaldonado/Documents/Projects/Template/node_modules/@bugsnag/react-native/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/isaacmaldonado/Documents/Projects/Template/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:86 (include)
C/C++:   CMakeLists.txt:31 (include)
C/C++: CMake Error at /Users/isaacmaldonado/Documents/Projects/Template/node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake:89 (target_link_libraries):
C/C++:   Cannot specify link libraries for target
C/C++:   "react_codegen_BugsnagReactNativeSpec" which is not built by this project.
C/C++: Call Stack (most recent call first):
C/C++:   CMakeLists.txt:31 (include)
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

1 participant