Code Monkey home page Code Monkey logo

urbgard's Introduction

IMPORTANT: SPLASH SCREEN IS ONLY CONFIGURED TO ANDROID. This tutorial explains both Android and iOS:

https://medium.com/@pqkluan/how-to-implement-splash-screen-in-react-native-navigation-ee2184a1a96

Installing all package dependencies:

    npm install

Building to Android Simulator or device:

    npm run android

Running on Android

    npm start

Building to a real Android device which will use it on production(.apk):

   npm run build-android 

Developing on a real device:

https://facebook.github.io/react-native/docs/running-on-device

adb shell input keyevent 82
adb -s <device name> reverse tcp:8081 tcp:8081

adb devices

How to open emulator without oppening Android Studio cd ~/Android/Sdk/emulator && ./emulator -avd Pixel_API_28


How to debug React Native Code and Redux Store? The best tool is (react Native Debugger)[https://github.com/jhen0409/react-native-debugger];

It's not a package, it's a tool. Therefore it needs to be downloaded and installed: (Download of last release)[https://github.com/jhen0409/react-native-debugger/releases];


React Native Navigation package: It's equivalent to React Router but once mobile hasn't URLs it needs another approach to controll on which screens we're.

There are two main steps to install (react-native-navigation library)[https://github.com/wix/react-native-navigation](see (Documentation)[https://wix.github.io/react-native-navigation/#/installation-android])

Note: it needs to be installed separetly on Android and on iOS;


Updating build Gradle from 2.0 to 3.0 version: Google Maps API for example uses 3.0 gradle version. Normally it will be already configured.

In the case its not: https://itnext.io/install-react-native-maps-with-gradle-3-on-android-44f91a70a395


Troubleshotting

  1. ERROR Packager can't listen on port 8081 Sometimes npm start command continues to use the 8081 port even when it was stopped. Therefore it needs to be killed.

On Linux:

sudo lsof -i :8081 //see who is using 8081 port kill -9 <pid> //pid is the process id you got using the command above

PS: normally there will be more than one process listening/using this port (Debugger, Emulator, etc). You should kill "NODE" process;

  1. Wrong JAVA_HOME folder: How to set JAVA_HOME to env variable:

First, add it to bashrc file running the command below (maybe jre folder will be different on your computer):

echo 'export JAVA_HOME=/usr/local/android-studio/jre/bin' >> ~/.bashrc

In order to take effect on the current terminal, execute it: source /etc/profile/

If it doesn't take effect instantly, reebot the system.

  1. adb devices shows a device without permissions:
sudo ./adb kill-server
sudo ./adb start-server
sudo ./adb devices

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.