I am trying to get Code Push to work with an Android React Native Deployment; however, I am getting the following errors
/myApp/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:14: error: cannot find symbol
import com.facebook.react.bridge.JSBundleLoader;
^
symbol: class JSBundleLoader
location: package com.facebook.react.bridge
/myApp/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java:21: error: CodePush is not abstract and does not override abstract method createJSModules() in ReactPackage
public class CodePush implements ReactPackage {
^
/myApp/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:103: error: cannot find symbol
JSBundleLoader latestJSBundleLoader;
^
symbol: class JSBundleLoader
location: class CodePushNativeModule
/myApp/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:105: error: cannot find symbol
latestJSBundleLoader = JSBundleLoader.createAssetLoader(getReactApplicationContext(), latestJSBundleFile, false);
^
symbol: variable JSBundleLoader
location: class CodePushNativeModule
/myApp/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java:107: error: cannot find symbol
latestJSBundleLoader = JSBundleLoader.createFileLoader(latestJSBundleFile);
^
symbol: variable JSBundleLoader
location: class CodePushNativeModule
Note: /myApp/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors
:react-native-code-push:compileReleaseJavaWithJavac FAILED
Any suggestions would be appreciated
(The more info the faster we will be able to address it!)
I think this is related to #935 ; however, I do not quite understand how to fix it.
Hello @jaysig and thanks for reaching us.
Unfortunately react-native 0.44 is not compatible with react-native code-push plugin 5.0.0-beta due to some breaking changes in the react-native.
Please checkout our compatibility table to see which versions of react-native and react-native-code-push are compatible.
In your case you can fix the issue in two different ways:
1) Upgrade react-native from 0.44 to 0.47
2) Downgrade react-native-code-push to v2.0.+
Please let us know if this helps.
Okay thanks for the clarification, that fixed my issue.
Most helpful comment
Hello @jaysig and thanks for reaching us.
Unfortunately react-native 0.44 is not compatible with react-native code-push plugin 5.0.0-beta due to some breaking changes in the react-native.
Please checkout our compatibility table to see which versions of react-native and react-native-code-push are compatible.
In your case you can fix the issue in two different ways:
1) Upgrade react-native from 0.44 to 0.47
2) Downgrade react-native-code-push to v2.0.+
Please let us know if this helps.