react-native development of the bug summary _react-native

Source: Internet
Author: User
Tags android sdk manager

This blog will detail the various problems encountered in react-native development and its solutions.

Personal feeling, react-native early development really is a foot a big pit, the minute is abused to lie down.

No, just a bug.

1, under the Windows Build environment can refer to this blog.

Android windows to build React Native Android development environment

Question: In the fifth step, enter React-native Init reactnative, that is, when initializing the project, prompt: React-native is not internal or

An external command, nor is it a running program or batch file.

Reason: The previous node was not configured successfully.

Solution: Reference blog, mainly Node_path environment variables are not set successfully.

Nodejs, NPM installation configuration steps (Windows version)

2,

Problem: When you build the project, that is, when you enter React-native run-android, you will see failed to find build Tools revision 23.0.1, as shown in the figure:

Reason: The Android SDK is not updated for complete installation.

WORKAROUND: Set up the SDK and install the update.

Open the Android SDK Manager. Select the following items:
Android SDK build-tools Version 23.0.1
Android 6.0 (API 23)
Android Support Repository
Local Maven repository for Support libraries

As shown in the picture: After selecting, click on the lower right corner of the Install Packages ... For installation. You can open the details box in the lower-right corner to see if the installation is successful.

Because of a wall in the country, if you cannot update, you need to set up the mirror, using the agent. Recommend a website, http://www.androiddevtools.cn/#userconsent

This site collects and collates Android SDK for Android development, tools used in development, Android development tutorials, Android design specifications, free design materials, and more.

3,

Problem: When you build the project, the unable to upload some apks appears when you enter React-native run-android, as shown in the figure:

Reason: The app's configuration uses a more gradle version of the bug, such as version 1.3.1.

Workaround: Find com.android.tools.build:gradle:1.3.1 in the project folder/android/build.gradle file. Change it to this

A com.android.tools.build:gradle:1.2.3. Of course, other versions of Gradle may be fine.

4,

Problem: After the program was successfully installed, the large white screen appeared and the mobile phone did not appear in the directory option.

Reason: The phone itself is responsible for the application's permissions.

Solution: Open the Phone settings-application management-find just installed applications-rights Management-suspension window, open the suspension window.



5,

Problem: After build success, appear big red screen, shake mobile phone, choose dev Settings, input computer end ip:8081, app burst, stop running.

The reason: Good no language Ah, unexpectedly is the IP and the colon between 8081 problems.

Workaround: Change the colon to English format.

6,

Question: Could not connect to Development server (Android) looks like this:


Reason: The server is not connected.

Solution: See the following article in this blog.

React-native development could not connect to Development Server (Android) solution






Related Article

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.