Tag Archives: React Native

[Solved] React Native Error: A problem occurred configuring project ‘:app’. and Execution failed for t…

Recently, I changed my computer. I installed the react native environment again, and I had to import the previous projects. I encountered some small holes in the process of guiding the projects, and they were all solved. Let’s record them here

First, apply CD to the project through CMD and run the command

react-native run-android

I’m determined to make a mistake in guiding the project. The first error is the location of the SDK. The SDK installed on the previous computer is different from that installed on this computer

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> The SDK directory 'F:\AndroidSDK\AndroidSDK' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Solution:

This is the problem of configuration files, which can be easily solved by making good use of Android studio

First, open Android studio and click open

Find the Android under your project and click OK

Android studio will automatically identify your configuration problems and help you fix them

You can also change the location of the SDK manually

Continue react native run Android and find the continue error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:incrementalDebugJavaCompilationSafeguard'.
> java.io.IOException: Could not delete path 'D:\RN\react_native_workspace\AwesomeProject2\android\app\build\intermediates\classes\debug\android\support'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Said it couldn’t remove D:: RN \ \ react_ native_ We will enter your project Android App build intermediates classes and delete the debug file manually

If you continue to react native run Android, there may be errors. They are all related to configuration in the debug file. Continue to delete the debug file and run it again. I operated 4 ~ 5 times, and finally the project was successfully installed

 

Solution of “could not connect to development server” in react native

Website content quality is poor, distribution efficiency is too low how to do?Huawei engineers offer 5 unique skills>>>

the solution of “could not connect to development server” appears when react native is running

Reference article:

(1) Solution of “could not connect to development server” in react native

(2) https://www.cnblogs.com/iosapp/p/5301070.html

Let’s make a note.

Error watching file for changes when running react native project: emfile problem solving

What are the eight life cycle hook functions of Vue>>>

When I run react native project on MAC system, I have the following problems:

It’s a problem with watchman, a tool provided by Facebook to monitor file system changes. Installing this tool can improve the performance of development (the packer can quickly capture the changes of files to achieve real-time refresh), so I unloaded and reloaded to solve the problem. The solution is as follows:

1. Uninstall watchman: brew uninstall watchman

2. Remove the watchman related files: RM – RF/usr/local/var/run/watchman/

3. Install watchman: brew install watchman

For details, please refer to the official GitHub issues of react native:

How to Solve React Native Error: Could not get BatchedBridge

After developing react native under windows and executing react native run Android , the mobile phone will display a red screen prompt: could not get batchedbridge, make sure your bundle is packaged correctly will be displayed

This situation is usually caused by the occupation of the 8081 port of the computer, because react native will start the nodejs service on the 8081 port, and the mobile debugging depends on this service

We can see what program occupies port 8081: 1. Execute netstat - AON | findstr "8081" 2

2. See that the 8064 program is listening on this port, and then execute tasklist | findstr 8064 task

You can see that the process name of 8064 is WiFi master.exe. It was originally WiFi sharing master, which occupied port 8081

3. Close the WiFi sharing master software, and then execute react native run Android to run normally