[Android]Error CodePushNativeModule.java:22: error: cannot find symbol when I set up code push in my Project.
:react-native-code-push:processReleaseJavaRes UP-TO-DATE :react-native-code-push:compileReleaseJavaWithJavac /Users/admin/bds/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.modules.core.ChoreographerCompat; ^ symbol: class ChoreographerCompat location: package com.facebook.react.modules.core /Users/admin/bds/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:23: error: cannot find symbol import com.facebook.react.modules.core.ReactChoreographer; ^ symbol: class ReactChoreographer location: package com.facebook.react.modules.core /Users/admin/bds/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:258: error: package ReactChoreographer does not exist ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() { ^ /Users/admin/bds/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:258: error: package ChoreographerCompat does not exist ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() { ^ /Users/admin/bds/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:258: error: cannot find symbol ReactChoreographer.getInstance().postFrameCallback(ReactChoreographer.CallbackType.TIMERS_EVENTS, new ChoreographerCompat.FrameCallback() { ^ symbol: variable ReactChoreographer 5 errors :react-native-code-push:compileReleaseJavaWithJavac FAILED
I used "react-native": "^0.41.2" and "react-native-code-push": "^2.0.2-beta".
Hey @lelup what version of RN and RN CodePush you are on? I believe the issue might be because you use RN <43 with latest version of RN CodePush plugin. Please see our compatibility table for details.
Please let us know if it helps.
Hi @max-mironov I used "react-native": "^0.41.2" and "react-native-code-push": "^2.0.2-beta" in my app. I will check your help. Thanks!
@lelup got it, that should be the issue. I'm closing the ticket for now, feel free to reopen/create a new one if you have any questions.
I got problems. I using RN version "react-native": "0.41.2". How to fix this problem.
Hello @iambanh2, you can probably do one of the following:
- Upgrade RN to 0.43.x version and use react-native-code-push 2.0.x versions
- Use react-native-code-push 1.17.x versions with RN 0.40-0.42 versions.
Please choose whatever is more convenient to you.