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

Android build fails on Linux with latest RePack #857

Closed
baychev opened this issue Jan 8, 2025 · 4 comments
Closed

Android build fails on Linux with latest RePack #857

baychev opened this issue Jan 8, 2025 · 4 comments
Assignees
Labels
status:confirmed The issue has been reviewed and all necessary information is provided. type:bug A bug report.

Comments

@baychev
Copy link

baychev commented Jan 8, 2025

Describe the bug

Hello,
I am attempting to run a clean install, but am getting this error:

Task :callstack_repack:configureCMakeDebug[arm64-v8a] FAILED
C/C++: CMake Error at CMakeLists.txt:10 (add_library):
C/C++: Target "callstack-repack" links to target "ReactAndroid::reactnativejni"
C/C++: but the target was not found. Perhaps a find_package() call is missing for
C/C++: an IMPORTED target, or an ALIAS target is missing?
C/C++: CMake Generate step failed. Build files cannot be regenerated correctly.
77 actionable tasks: 48 executed, 29 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':callstack_repack:configureCMakeDebug[arm64-v8a]'.
    ...
    CMake Error at CMakeLists.txt:10 (add_library):
    Target "callstack-repack" 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?

System Info

System:
  OS: Linux 5.15 elementary OS 6.1 Jólnir
  CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  Memory: 1.52 GB / 7.45 GB
  Shell:
    version: 5.0.17
    path: /bin/bash
Binaries:
  Node:
    version: 20.18.0
    path: ~/.nvm/versions/node/v20.18.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.18.0/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.18.0/bin/npm
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "34"
      - "35"
    Build Tools:
      - 33.0.0
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34 | Intel x86_64 Atom
      - android-34 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.5
    wanted: 0.76.5
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Re.Pack Version

4.3.3

Reproduction

https://github.com/baychev/react-native-whitelabel

Steps to reproduce

Not working:
npx @react-native-community/cli init mobile --skip-install
cd mobile
npx @callstack/repack-init
npm run android

Working:
npx @react-native-community/cli init mobile
cd mobile
npm run android

@baychev baychev added status:new New issue, not reviewed by the team yet. type:bug A bug report. labels Jan 8, 2025
@SmartByt3r
Copy link

Same happened to me recently

I am using the following versions:

"react-native": "0.76.5"
"@callstack/repack": "4.3.3"
"webpack": "5.97.1"

@jbroma
Copy link
Member

jbroma commented Jan 9, 2025

Hi, this looks like an incompatibility with newest version of React Native.

I've backported the support for RN 0.76 & released Re.Pack 4.4.0, it should solve your issue 👍

Let me know if this solved your problems so we can close this issue, thanks!

@jbroma jbroma self-assigned this Jan 9, 2025
@jbroma jbroma added status:confirmed The issue has been reviewed and all necessary information is provided. and removed status:new New issue, not reviewed by the team yet. labels Jan 9, 2025
@SmartByt3r
Copy link

Hi, this looks like an incompatibility with newest version of React Native.

I've backported the support for RN 0.76 & released Re.Pack 4.4.0, it should solve your issue 👍

Let me know if this solved your problems so we can close this issue, thanks!

Yes, I can confirm the issue was solved

Thanks for the quick response

@baychev
Copy link
Author

baychev commented Jan 10, 2025

Thanks Jakub, the issue is resolved.

@baychev baychev closed this as completed Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:confirmed The issue has been reviewed and all necessary information is provided. type:bug A bug report.
Projects
None yet
Development

No branches or pull requests

3 participants