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

Android build fails - cannot find symbol (1.17.4-beta + RN 0.42.3) #1282

Closed
ben-snaize opened this issue May 16, 2018 · 8 comments
Closed

Android build fails - cannot find symbol (1.17.4-beta + RN 0.42.3) #1282

ben-snaize opened this issue May 16, 2018 · 8 comments

Comments

@ben-snaize
Copy link

ben-snaize commented May 16, 2018

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
@Borovensky
Copy link

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.

@ben-snaize
Copy link
Author

ben-snaize commented May 16, 2018

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

@waltermvp
Copy link

Same here with RN version .44

@atticoos
Copy link

This is due to facebook/react-native#19259

@Borovensky
Copy link

Yeah, I also find the solution here: facebook/react-native#19272

@ben-snaize
Copy link
Author

ben-snaize commented May 16, 2018

Cheers @Borovensky @ajwhite. Sorted with:

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

@ben-snaize
Copy link
Author

ben-snaize commented May 16, 2018

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

@Borovensky
Copy link

@ben-snaize Thanks for update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants