An open API service indexing awesome lists of open source software.

https://github.com/wilspi/expense-notes

Expense Manager - Android
https://github.com/wilspi/expense-notes

android react-native

Last synced: 3 months ago
JSON representation

Expense Manager - Android

Awesome Lists containing this project

README

          

# Expense Notes

Playstore: https://play.google.com/store/apps/details?id=com.expensenotes

### Development

* 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
```

### Common issues faced

* **"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](https://stackoverflow.com/questions/56743716/could-not-find-com-android-tools-buildgradle5-4-1):
```
// 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"
}
}
}
```