Daily Notes React Native, JavaScript, XCODE, android Gradle

Imdad Hussain
2 min readMar 24, 2022

Issue 1: adb devices command not found

issue

adb is the command line tool to install and run android apps on your phone/emulator.

Make sure you already have android Studio installed.

Add platform-tools to your path. Check first if you have terminal -zsh terminal, it is indicated on terminal. If you have -zsh terminal. replace all references to ~/.bash_profile with ~/.zshrc.

check if you don’t have file with name ~/.zshrc in root then create one with command

  • touch ~/.zshrc

Now run following commands in terminal

  • echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.zshrc
  • echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.zshrc

Refresh your bash profile (or restart your terminal app)

  • source ~/.zshrc

Start using adb

  • adb devices

Reference: https://stackoverflow.com/questions/17901692/set-up-adb-on-mac-os-x

Issue 2: How to add custom font in react native

  • Create a file named react-native.config.js in the root folder of your project.
  • add this in that new file
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts']
};
  • run react-native link command in the root project path.

Reference: https://stackoverflow.com/questions/41825276/how-to-add-custom-font-in-react-native-android

--

--

Imdad Hussain

Mobile Engineer @ Nova, React | React Native|Redux, JavaScript | TypeScript mostly Frontend | more at https://hussainimdad.web.app/