React-native-code-push: Android: JSbundle Issue

Created on 6 Aug 2017  路  3Comments  路  Source: microsoft/react-native-code-push

Description

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

Additional Information

  • react-native-code-push version: 5.0.0-beta
  • react-native version: 0.44
  • iOS/Android/Windows version:
  • Does this reproduce on a debug build or release build? Trying to just test debug
  • Does this reproduce on a simulator, or only on a physical device? Still at simulator stage

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

waiting-for-clarification

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.

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

osdnk picture osdnk  路  3Comments

cgerikj picture cgerikj  路  3Comments

Phredward picture Phredward  路  3Comments

ACCTFORGH picture ACCTFORGH  路  3Comments

djw27 picture djw27  路  3Comments