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

Open
baychev opened this issue Jan 8, 2025 · 1 comment
Open

Android build fails on Linux with latest RePack #857

baychev opened this issue Jan 8, 2025 · 1 comment
Labels
status:new New issue, not reviewed by the team yet. 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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:new New issue, not reviewed by the team yet. type:bug A bug report.
Projects
None yet
Development

No branches or pull requests

2 participants