React native clean build cache and reinstall

clean.sh, this script will clean the Android and IOS build cache, then removes node modules and caches, and reinstall the react native project.

# rm -rf $HOME/.gradle/caches/
cd android && ./gradlew cleanBuildCache
cd ..
cd ios && pod cache clean --all && rm -rf build
cd ..
rm -rf node_modules
yarn cache clean --force
yarn install
cd ios && pod install

To run it, make this script executable if it is not yet executable.

chmod +x clean.sh

Then run it

./clean

To reset the iOS simulator and erase all simulator data, focus on the simulator then go to Hardware -> Erase All Content and Settings

To reset the Android emulator and erase all data, open Android Studio then goes to menu Tools -> AVD Manager, then click the dropdown menu on the selected simulator and click on wipe data.

Search within Codexpedia

Custom Search

Search the entire web

Custom Search