First understand react native problems, reactnative
Problems encountered by Andriod when using react native
When an existing project is opened, the following error occurs:
From the first line of Error, we can know that a zip compressed file cannot be opened. Next we can see that there is a problem with the downloaded Gradle file, and the prompt is to allow the new download.
Open the gradle-wrapper.properties file and you will seeGradle-2.14.1-all.zip
This version is used.
Check whether the file is faulty in the installation directory.
The default installation mode is C: \ Users \ xiaxf \. gradle. You can also find the installation directory through Android studio.
File-setting
Under the directory C: \ Users \ xiaxf \. gradle \ wrapper \ dists \ gradle-2.14.1-all \ 8bnwg5hd3w55iofp58khbp6yv
If the gradle-2.14.1-all.zip file is corrupted, an error is returned. So download from the new official website and replace it. Http://services.gradle.org/distributions
Then the file is resolved.
The second problem occurs: Configuration with name 'default' not found.
This problem is that all the projects were not downloaded during git clone.
Execute git submodule update -- init -- recursive
If the project still reports an error, the problem should be that the project dependent package does not exist, and the package in package. json is not downloaded. Npm install.