react-native icon indicating copy to clipboard operation
react-native copied to clipboard

List<ReactPackage> packages = new PackageList(this).getPackages(); [ANDROID]

Open carlottaarmenise-job opened this issue 1 year ago • 2 comments

Description

In MainApplication.java when I build on Android Studio, it gives me the error: /android/app/src/main/java/com/dindle/app/MainApplication.java:24: error: cannot find symbol List<ReactPackage> packages = new PackageList(this).getPackages(); ^ symbol: class PackageList

I upgraded version 0.70.6 to 0.71.9

Steps to reproduce

Build android

React Native Version

0.71.9

Affected Platforms

Runtime - Android

Output of npx react-native info

warn Package rn-fetch-blob contains invalid configuration: "dependency.hooks" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
    OS: macOS 14.4
    CPU: (8) arm64 Apple M2
    Memory: 94.16 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node
    Yarn: 1.15.2 - ~/.nvm/versions/node/v16.20.2/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm
    Watchman: 2023.11.20.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.13.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2023.2 AI-232.10300.40.2321.11668458
    Xcode: 15.3/15E204a - /usr/bin/xcodebuild
  Languages:
    Java: 17.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0 
    react-native: 0.71.9 => 0.71.9 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
info React Native v0.74.0 is now available (your project is running on v0.71.9).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.74.0
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.71.9
info For more info, check out "https://reactnative.dev/docs/upgrading".

Stacktrace or Logs

/android/app/src/main/java/com/dindle/app/MainApplication.java:24: error: cannot find symbol
          List<ReactPackage> packages = new PackageList(this).getPackages();
                                            ^
  symbol: class PackageList

Reproducer

.

Screenshots and Videos

No response

carlottaarmenise-job avatar Apr 24 '24 11:04 carlottaarmenise-job

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

github-actions[bot] avatar Apr 24 '24 11:04 github-actions[bot]

:warning: Unsupported Version of React Native
:information_source: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

github-actions[bot] avatar Apr 24 '24 11:04 github-actions[bot]

In MainApplication.java when I build on Android Studio, it gives me the error:

That happens because the code for PackageList (which is code generated by the CLI) hasn't been generated yet. You can solve this by invoking yarn android from terminal and then opening your project inside Android Studio.

cortinico avatar Apr 24 '24 17:04 cortinico