Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

CodePushNativeModule.java: error: cannot find symbol (multiple similar errors) #1061

@afilp

Description

@afilp

With the latest upgrade (today) of all my packages (rncp included), I cannot build anymore. See errors below:

E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:9: error: cannot find symbol
import com.facebook.react.ReactApplication;
                         ^
  symbol:   class ReactApplication
  location: package com.facebook.react
E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:19: error: cannot find symbol
import com.facebook.react.modules.core.ChoreographerCompat;
                                      ^
  symbol:   class ChoreographerCompat
  location: package com.facebook.react.modules.core
E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:21: error: cannot find symbol
import com.facebook.react.modules.core.ReactChoreographer;
                                      ^
  symbol:   class ReactChoreographer
  location: package com.facebook.react.modules.core
E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:160: error: cannot find symbol
                        instanceManager.recreateReactContextInBackground();
                                       ^
  symbol:   method recreateReactContextInBackground()
  location: variable instanceManager of type ReactInstanceManager
E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:197: error: cannot find symbol
        ReactApplication reactApplication = (ReactApplication) currentActivity.getApplication();
        ^
  symbol:   class ReactApplication
  location: class CodePushNativeModule
E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:197: error: cannot find symbol
        ReactApplication reactApplication = (ReactApplication) currentActivity.getApplication();
                                             ^
  symbol:   class ReactApplication
  location: class CodePushNativeModule
E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:236: error: package ReactChoreographer does not exist
                                    ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
                                                                                                         ^
E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:236: error: package ChoreographerCompat does not exist
                                    ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
                                                                                                                                                             ^
E:\R\ourMobileApp\node_modules\react-native-code-push\android\app\src\main\java\com\microsoft\codepush\react\CodePushNativeModule.java:236: error: cannot find symbol
                                    ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() {
                                    ^
  symbol: variable ReactChoreographer
9 errors
:react-native-code-push:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

Environment

  • react-native-code-push version: v5.1.3-beta
  • react-native version: ^0.49.3
  • iOS/Android/Windows version: Windows 10
  • Does this reproduce on a debug build or release build? Both
  • Does this reproduce on a simulator, or only on a physical device? Does not go there, build fails

(The more info the faster we will be able to address it!)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions