Application MyTest have not been registered. This was either due to a require () error during initialization or failure to call appregistry.registercomponent.

Source: Internet
Author: User

Run React-native project times wrong.

Note: The project was originally good, again run the error

There is a solution, but I don't know what the reason is. I would like to have children's shoes that know the specific reasons to add

The first case: it's really the wrong time to register. This is the wrong thing to register:

Appregistry.registercomponent (' Mydemo ', () = Mydemo);

Note: ' Mydemo ' This is the project name Mydemo this you can specify with your preference.

The second situation: in other cases, you feel that everything is good, but running up will still report the error. Well, there's a good chance that port 8081 is occupied.

You can try: switch to the directory where the project is located, enter react-native start if the packager can ' t listen on port 8081 that indicates that the port is occupied.

Follow the instructions on the command prompt:

1.lsof-n-i4tcp:8081 List of occupied ports

2.kill-9 <PID> Find the corresponding PID and delete it.

3. Re-run the project React-native run-ios/android

Finish the call.

Application MyTest have not been registered. This was either due to a require () error during initialization or failure to call appregistry.registercomponent.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.