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 fail with error : cannot find symbol class JSBundleLoader #935

Closed
pankaj-ag opened this issue Jul 22, 2017 · 5 comments
Closed

Comments

@pankaj-ag
Copy link

  • react-native-code-push version:4.1.0-beta
  • react-native version:0.44
    It got failed when i try to run react-naitve run-android
@Antoine-C
Copy link

Did you try to use the correct tag for your RN version ?

v0.43-v0.44 | v2.0+ (RN refactored uimanager dependencies)

I had the same problem and then I downgrade RNCodePush to the V2.1.1 tag and everything is working fine.

@max-mironov
Copy link
Contributor

@pankaj-ag please let us know if the comment from above help you to resolve your issue

@pankaj-ag
Copy link
Author

Yes. I just tried and its working fine now. Thanks

@iamhardik08
Copy link

Hello,

I am using :
RN - ^0.45.1
RNCodePush - ^5.0.0-beta

I am getting this error
D:\upstream\procurewise_mobile\hybrid\Procurewise\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
D:\upstream\procurewise_mobile\hybrid\Procurewise\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 {
^
D:\upstream\procurewise_mobile\hybrid\Procurewise\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
D:\upstream\procurewise_mobile\hybrid\Procurewise\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
D:\upstream\procurewise_mobile\hybrid\Procurewise\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: D:\upstream\procurewise_mobile\hybrid\Procurewise\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

What shall I do to make it work properly?

What should be the exact react-native and react-native-code-push version to use for stable build.

@max-mironov
Copy link
Contributor

Hi there @iamhardik08 , that looks like your version of RN is not compatible with RNCP.
You should use RNCP v3.0.0+ this way.
Please checkout our compatibility table: https://github.com/Microsoft/react-native-code-push#supported-react-native-platforms

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

4 participants