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

CMake Error while building react native android app in android studio. #2409

Open
jet2018 opened this issue Oct 16, 2024 · 3 comments
Open
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android

Comments

@jet2018
Copy link

jet2018 commented Oct 16, 2024

Description

ERROR:-
Target "rnscreens" links to target "ReactAndroid::react_render_consistency"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?
CMake Error at CMakeLists.txt:6 (add_library):
Target "rnscreens" links to target
"ReactAndroid::react_performance_timeline" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
CMake Error at CMakeLists.txt:6 (add_library):
Target "rnscreens" links to target
"ReactAndroid::react_render_observers_events" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?

INFO
System:
OS: macOS 15.0.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 45.36 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.15.0
path: ~/.nvm/versions/node/v20.15.0/bin/node
Yarn:
version: 4.4.1
path: /usr/local/bin/yarn
npm:
version: 10.7.0
path: ~/.nvm/versions/node/v20.15.0/bin/npm
Watchman:
version: 2024.07.01.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.0
- iOS 18.0
- macOS 15.0
- tvOS 18.0
- visionOS 2.0
- watchOS 11.0
Android SDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12483815
Xcode:
version: 16.0/16A242d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 19.0.2
path: /usr/bin/javac
Ruby:
version: 2.7.6
path: /Users/jet/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.75.4
wanted: 0.75.4
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Steps to reproduce

  1. Upgrade from react native 0.74.6 to 0.75.4

Snack or a link to a repository

https://react-native-community.github.io/upgrade-helper/?from=0.74.6&to=0.75.4

Screens version

^3.34.0 (latest)

React Native version

0.75.4

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Release mode

Device

Real device

Device model

Sumsung Galaxy s23 Ultra(Android 14)

Acknowledgements

Yes

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Oct 16, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Platform: tvOS Issue related with tvOS compatibility labels Oct 16, 2024
@jet2018
Copy link
Author

jet2018 commented Oct 16, 2024

This issue only happens upon upgrades. Therefore, there might not be a way to provide a snack here.

@kkafar
Copy link
Member

kkafar commented Oct 16, 2024

@jet2018,

this indicates that the upgrade was not done completely (maybe there are some missing changes) or there is some cache (cmake especially) present.

I would suggest to try simply removing all the cache you can, including all .cxx directories.

rm -fr node_modules android/build android/app/build android/app/.cxx.

I don't think we will be able to help much more w/o the reproducer, especially that we're working now on 0.75.4 ourselves & we haven't seen the issue you encountered.

@kkafar kkafar added Close when stale This issue is going to be closed when there is no activity for a while and removed Platform: iOS This issue is specific to iOS Platform: tvOS Issue related with tvOS compatibility labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

2 participants