Daily Notes React Native, JavaScript, XCODE, android Gradle

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

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Lazy Loading Images — The Complete Guide

WANT TO BE A FRONT-END DEVELOPER? YOU’LL NEED TO KNOW HOW TO ANSWER THESE 10 QUESTIONS ABOUT REACT

How to Share Components Between React Apps and Gatsby Websites

What’s the difference between the Korean particles 에 and 에서?

How I Felt Betrayed as a Programmer by My Colleagues & Boss

Creating The Infinity Gauntlet of Thanos with JavaScript Objects

Vue 3 Component Library

10 JavaScript basic thing that a beginner should know

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Imdad Hussain

Imdad Hussain

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

More from Medium

React Native ContentResolver for a Custom Content Provider

Full Screen React Native Android

What is React Native?

How To Add Android Push Notifications to a React Native Expo App