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

Error when require('react-native-xmpp') on android project #22798

Closed
hashanchamikara opened this issue Dec 26, 2018 · 8 comments
Closed

Error when require('react-native-xmpp') on android project #22798

hashanchamikara opened this issue Dec 26, 2018 · 8 comments
Labels
Bug Platform: Android Android applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@hashanchamikara
Copy link

Environment

React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 700.26 MB / 15.56 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 8.10.0 - /usr/bin/node
npm: 3.5.2 - /usr/bin/npm
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.1 => 0.57.1
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-xmpp: 1.0.3

Description

tried to install XMPP module in react native project react-native-xmpp

but after I use

var XMPP = require('react-native-xmpp');
it was return error

Cannot read property 'PLAIN' of undefined

Module AppRegistry is not a registered callable module (calling runApplication)

I didn't find where is this error occur please help

Reproducible Demo

here is stackoverflow question

@react-native-bot react-native-bot added Platform: Android Android applications. Platform: Linux Building on Linux. labels Dec 26, 2018
@rizwanatta
Copy link

after installing it! you should see if that REACT_NATIVE link command worked correctly and if not then you should do the process manually! by setting up the android MyApplication.java file

@hashanchamikara
Copy link
Author

yes it is working correctly,

i see there have some codes in settings.gradle, app/build.gradle and MainApplication.java files

screenshot from 2018-12-26 15-43-48
screenshot from 2018-12-26 15-43-34
screenshot from 2018-12-26 15-42-21

@rizwanatta
Copy link

you have the implementation of xmpp in your build.gradle dependencies!

redundant

means its written twice first remove that

and then go to

cd android

using android gradlew clean it!

cd ./gradlew && clean

after that run the react-native run-android

it should get you going with that error! now next depends upon how you are configuring XMPP

@hashanchamikara
Copy link
Author

Cannot read property 'PLAIN' of undefined

Module AppRegistry is not a registered callable module (calling runApplication)

it is same output bro

@rizwanatta
Copy link

Cannot read property 'PLAIN' of undefined

Module AppRegistry is not a registered callable module (calling runApplication)

it is same output bro

first remove the extra line! and clean the gradle cache! and then re start the whole pacakager and project and show what comes next!

@hashanchamikara
Copy link
Author

same output bro

@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants