React Common mistakes in the development of native

Source: Internet
Author: User

React native environment construction please: react native environment construction

Here's the react native. After the creation is complete, the common problems that appear in the run

Question 1:

Java.lang.RuntimeException:SDK location is not found. Define location with Sdk.dir in the Local.properties file or with an android_home environment variable.


This is because the project can't find our Android SDK.

workaround: Create a new Local.properties file under the Android file in the project's root directory (we can directly copy the Android project local.properties file ).


Question 2:

A problem occurred configuring project ': App '. >failed to find Build Tools revision 23.0.1

This is due to the inconsistency between build Tools revision 23.0.1 and the version in our SDK.

workaround: Note the correspondence between gradle-wrapper.properties in Build.gradle and Gradle.


3,could not install the app on the device and read the error above for details.

This is because the device that is running is not found

Workaround: Note Before you run the command: react-native run-android Make sure that the phone is connected to the computer.

4,com.android.ddmlib.installexception:failed to establish session

This is the Xiaomi phone debugging problems, I used Meizu before this problem

Workaround: -------developer options in Xiaomi Phone settings---------enable MIUI optimization off





React Common mistakes in the development of native

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.