-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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] module 0 is not a registered callable module. #7832
Comments
Looks like an integration issue, does it happens on a freshly init project ? |
@charpeni My js bundle server is a freshly init project. but android project is a pure Android Project.
Android Project load successfully. |
This normally happens when your react-native version of the application and dev server are not matched. |
@glcrazier When I Integrating with Existing Apps, My Android Project use gradle :
use the latest react-native version. (0.20.1 In Maven) So, latest react-native version in maven is old ? |
@chufengma from package.json, the react-native version dev server uses is 0.26.1. if u use 0.20.1 in your application, it won't work. I suggest you to specify the version clearly in your gradle file |
I got the same error.
make the "react-native" from "^0.27.0-rc2" to "^0.26.1" is ok? |
I'm experiencing this on Strangely, the first time I boot the app in the android emulator, it works fine. The instant I reload, or attempt to attach the chrome debugger, I start seeing a myriad of |
+1 |
Anybody got the gradle build version to 27? How do we specify gradle build to use the latest 0.27.x react native version? |
@bschandramohan your best bet is to have RN build from source: http://facebook.github.io/react-native/docs/android-building-from-source.html |
@nevir Thanks. Interestingly if I just give "com.facebook.react:react-native:+" on a react-native init project, then it downloads 0.27.2. |
@bschandramohan So, when Facebook publishes the module to npm, they precompile the android packages, and hide them under The annoying bit is that if you check out react native from git, or the build is broken (no |
I've just moved to always building RN from source in my team's RN projects - it's the least error-prone way we could find to guarantee the right version is present (and reduces confusion when we have to temporarily patch something in RN, or bump RN's version) |
Thank you all I got this error fixed today
this config point to npm downloaded newest build version <dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>23.0.1</version>
<scope>compile</scope>
</dependency> you'd better spcify the config version to
|
@alex306314 the method you suggest works if the same project has both android and react-native code. Your npm install downloads the latest React Native library. However if you have your android project in a separate repo (which doesn't use npm install), and only have compile "com.facebook.react:react-native:0.27.2" in gradle file, it will NOT be able to download that. For those scenarios, @nevir suggested building from React Native source. |
The other solution/workaround that works for android project (separate from your react native) one is to provide the maven reference to your react native project's node modules in the build.gradle file. For e.g.,
|
Be aware that if you point to RN from source (e.g. |
@nevir I recently learned that you can manually generate the required files for the |
Oho, awesome! Thanks for the tip On Wed, Jul 6, 2016, 16:42 Christopher Dro notifications@github.com wrote:
|
Thanks @nevir, I had the same problem - we were running off a fork of react-native from Github rather than npm and didn't have the generated artifacts, so I guess it was silently falling back to an incompatible version. It was working on another developer machine because he had the generated folder lying around from before we forked it. Would have taken me forever to find the cause :/ |
@christopherdro should we compose a PR to the docs explaining this? |
@Kureev Yea, I think that would be a great idea. I'll try and put a PR together |
@christopherdro @nevir I am in the same situation. Forked
|
@alex306314 I've tried doing that. my package.json is:
My gradle has:
As well as the Maven: node_modules has the correct react-native version - 0.28.0 If I change gradle to I get a cannot resolve. My npm install is on the same repo as the android project. |
Hi, I had the same problem, I always stop and start the |
My solution to this is change the react-native version of the packager to 0.20.0,the content of the package.json is like below: { |
It sounds like the original issue has led to some workarounds which are reasonable for now, so I am going to close this issue. It also seems like there are some people commenting with related-but-not-the-same issues - if those continue to be a problem then I encourage folks to open a new issue with repro information. |
Error when Integrating with Existing Apps.
My Android project is separated from Js bundle server.
android project: c/projects/android
js bundle server project: c/projects/react
MainActivity
app/build,gradle
My js bundle server package.js :
at js bundle folder
react-native start --port 5389
then i reload js at android deivces, It shows :
The text was updated successfully, but these errors were encountered: