React-native-code-push: Android build fails - cannot find symbol (1.17.4-beta + RN 0.42.3)

Created on 16 May 2018  路  8Comments  路  Source: microsoft/react-native-code-push

Since a successful set of Android builds on 11th May, I am encountering the following Android build error. This affects two different Macs used for building so it doesn't seem to be an environment issue. No changes to package.json etc. have been made recently.

Steps to Reproduce

See example demo below or from an existing project:

  1. npm i [email protected]
  2. Link to Android project as per usual
  3. cd android && ./gradlew assembleRelease

Expected Behavior

Build compiles

Actual Behavior

Build does not compile:

/Users/me/App/App/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:22: error: cannot find symbol
import com.facebook.react.uimanager.ReactChoreographer;
                                   ^
  symbol:   class ReactChoreographer
  location: package com.facebook.react.uimanager
/Users/me/App/App/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:295: error: method does not override or implement a method from a supertype
    @Override
    ^
/Users/me/App/App/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:257: error: package ReactChoreographer does not exist
                                    ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new Choreographer.FrameCallback() {
                                                                                                         ^
/Users/me/App/App/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:257: error: cannot find symbol
                                    ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new Choreographer.FrameCallback() {
                                    ^
  symbol: variable ReactChoreographer
4 errors

Reproducible Demo

Environment

  • react-native-code-push version: 1.17.4-beta
  • react-native version: 0.42.3
  • iOS/Android/Windows version: Android build
  • Does this reproduce on a debug build or release build? Both
  • Does this reproduce on a simulator, or only on a physical device? Build issue

All 8 comments

Started facing pretty the same issue today...Successfully build Android like a few days ago, since those time didn't do any changes to package.json. Also trying to build the app on another PC, but still review the same issue.

screen shot 2018-05-16 at 1 54 35 pm

Environment

  • react-native-code-push version: 3.0.1-beta
  • react-native version: 0.45.1

If someone have any suggestion, please help.

@Borovensky I also get the same single @Override failure if I try newer RN + CP.

Same here with RN version .44

Yeah, I also find the solution here: https://github.com/facebook/react-native/issues/19272

Cheers @Borovensky @ajwhite. Sorted with:

subprojects {
    configurations.all {
        resolutionStrategy {
            force 'com.facebook.react:react-native:0.42.3'
        }
    }
}

Update: you don't even need the above any more because of this fix from JCenter.

@ben-snaize Thanks for update!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ninjz picture ninjz  路  4Comments

quanzaiyu picture quanzaiyu  路  3Comments

ACCTFORGH picture ACCTFORGH  路  3Comments

panarasi picture panarasi  路  4Comments

djw27 picture djw27  路  3Comments