How to fix React-Native Error 'could not unzip gradle-5.4.1-all.zip' - react-native

I have created a project HelloWorld in react native by using react-native init HelloWorld
When I run the project by using react-native run-android command, i am facing error
could not unzip gradle-5.4.1-all.zip
I have tried the following
1.updated react native
2.wipe the data from Emulator.

To resolve this kind of error the following steps are used
Open My computer.
Navigate the following folder
C:\Users\UserName.gradle\wrapper\dists
Delete the 'gradle-5.4.1-all.zip' folder
Run React-native project by using react-native run-android command.
The system will download updated gradle-5.4.1-all.zip file so
internet connection must be ON

Related

Not able to create React native app using React native version 0.69.0

I have tried to install app using
npx react-native init ProjectName
But it has just created package and node module files and not created Platform-specific folders like android and ios.
Try rerunning this command in another folder.
Check if there any errors in terminal where you ran that command

React Native missing script Android

I added a vector icon package in my React Native app. But After adding vector icon library I am trying to rebuild project using
**npm run android
react-native link**
But it's giving me an error
npm err missing script android react native
I have tried many solutions of updating package.json file from Github and I have tried to change the path of the environment but still same
I think you are using the wrong command to make debug build.
Following these steps:
install vector icon
link it from your project root directory using the command react-native link your_package_name
Use this command from your project root directory to make build react-native run-android

cannot able to run react native project by android emulator

Error when try to run
I am having react native project and iam trying on android emulator via below command
react-native run-android
but its not working getting the error like in the image
From your log, it's clear that you haven't configured SDK location
You must add SDK location
sdk.dir=/Users/XXXXX/Library/Android/sdk
Create a new file named local.properties inside the android folder of your react-native app.
Add the SDK location.
Hope this helps

The Expo SDK requires Expo to run

I'm running my project on expo. After running expo eject, I'm getting the following error:
The Expo SDK requires Expo to run
Even for a brand new project I'm getting this error and I cannot do anything with expo anymore.
I run :
expo init Project1
and then going inside the Project1 direcotory and run:
expo start // and then click 'a' for running project on android emulator.
and emulator screen shows this error.
If you have logged into the command line on your computer, log out and try reloading the app. Otherwise reinstall expo and try again.

React Native AwesomeProject error: could not find source file at index.ios.js

I did a fresh installation of latest React Native and tried the AwesomeProject. But I got a red screen on iOS 6 simulator with the following error message:
could not find source file at index.ios.js
:0
I used the following command to create the default project:
react-native init AwesomeProject2
And I didn't change a single line of code. Is this an installation issue?
I rebooted my machine and it worked fine now.