Skip to content

[Android] [0.68.0] Cannot find symbols for new architecture upgrade #33623

@Mingyang-Li

Description

@Mingyang-Li

New Version

0.68.0

Old Version

0.65.1

Build Target(s)

Android - Pixel 4 (API 32)

Output of react-native info

System:
OS: Windows 10 10.0.19042
CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
Memory: 18.33 GB / 31.94 GB
Binaries:
Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
Yarn: 3.1.1 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowAllTrustedApps: Disabled
IDEs:
Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8193401
Visual Studio: 17.0.31912.275 (Visual Studio Community 2022)
Languages:
Java: 1.8.0_312
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.0 => 0.68.0
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Issue and Reproduction Steps

Issue: Cannot find symbol BuildConfig
Places issues detected:
File android\app\src\main\java\com\rndiffapp\MainApplication.java

  1. import com.rndiffapp.newarchitecture.components.MainComponentsRegistry;
  2. return BuildConfig.DEBUG;
  3. if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED)

Steps tried to debug:

  1. Adding import com.rndiffapp.BuildConfig; for this file

Issue: Cannot find symbol MainComponentsRegistry
File android\app\src\main\java\com\rndiffapp\newarchitecture\MainApplicationReactNativeHost.java

  1. return new MainApplicationTurboModuleManagerDelegate.Builder();
  2. MainComponentsRegistry.register(componentFactory);

Steps tried to debug:

  1. Adding import com.rndiffapp.newarchitecture.components.MainComponentsRegistry; to top of file
  2. Addeding import com.rndiffapp.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; to top of file

Steps to reproduce:

  1. Follow upgrade guide on https://react-native-community.github.io/upgrade-helper/?from=0.65.1&to=0.68.0
  2. Keep updating files from the top all the way till android/app/src/main/java/com/rndiffapp/MainApplication.java
  3. Open Android studio
  4. Start running any virtual device
  5. run yarn android or npm run react-native

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidAndroid applications.Resolution: AnsweredWhen the issue is resolved with a simple answerType: New ArchitectureIssues and PRs related to new architecture (Fabric/Turbo Modules)Type: Upgrade IssueIssues reported from upgrade issue form

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions