Playstore: https://play.google.com/store/apps/details?id=com.expensenotes
-
Setup nodejs
-
Steps to install:
npm install npx react-native eject npx react-native link
-
Clean:
rm -rf android ios node_modules
-
To see console log statements run:
npx react-native log-android
-
Run on Android:
Run android emulator:
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home" export ANDROID_HOME=$HOME/Library/Android/sdk export PATH="$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH" emulator -avd $(emulator -list-avds)
Run app:
npx react-native run-android
-
Run release version on Android:
npx react-native run-android --variant=release
-
"No Java runtime present, requesting install" on
react-native run-android
.set environment variables:
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH="$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH"
-
"error=86, Bad CPU type in executable" on
react-native run-android
in file
gradle-wrapper.properties
set:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
change file
build.gradle
to this, source:// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenLocal() google() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } } }