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: JSbundle Issue #955

Closed
jaysig opened this issue Aug 6, 2017 · 3 comments
Closed

Android: JSbundle Issue #955

jaysig opened this issue Aug 6, 2017 · 3 comments

Comments

@jaysig
Copy link

jaysig commented Aug 6, 2017

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!)

@jaysig
Copy link
Author

jaysig commented Aug 6, 2017

I think this is related to #935 ; however, I do not quite understand how to fix it.

@max-mironov
Copy link
Contributor

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.

@jaysig
Copy link
Author

jaysig commented Aug 7, 2017

Okay thanks for the clarification, that fixed my issue.

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

No branches or pull requests

2 participants