Coder Social home page Coder Social logo

rntodo's Introduction

Nice demo project for React Native

Run the app on Android

Next, to start metro server in development mode, check that you are using node version 16 (node --version), then run:

npx react-native start

Open another terminal window and run

npx react-native run-android

Run tests on Android

Run

npm test

Tests should always pass!

These tests use enzyme and jest for testing.

Get started

To start, clone the project.

git clone [email protected]:billmoser/rnTodo.git

Next, make sure that JDK 11 is installed.

java --version
openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.04, mixed mode, sharing)

If it's not installed, you will have to install it. I installed it by running sudo apt-get install openjdk-11-jdk on my Ubuntu 21.04 computer.

Git tips

Information about merge vs rebase (Atlassian)

Simple git workflow (Atlassian)

How to contribute to this project

# Start your feature branch
git checkout -b <123-my-feature-branch>
# Do some work...
# Do these first two steps in the case where we have not yet pushed our feature branch to remote
git checkout main
git pull
# Checkout your feature branch again
git checkout <123-my-feature-branch>
git fetch origin
git rebase origin/main
git push origin <123-my-feature-branch>
# Then create your PR

Troubleshooting

If you see this error when running npx commands ...

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 936 file(s) to forward-jetify. Using 12 workers...
info JS server already running.
info Installing the app...

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: spawn ./gradlew EACCES
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
info Run CLI with --verbose flag for more details.

... then try running sudo chmod 755 android/gradlew. See StackOverflow for info.

Of course, you will need a device attached in USB debugging mode or you will need to have an Android emulator running.

rntodo's People

Contributors

billmoser avatar fullstackoasis avatar

Watchers

 avatar

rntodo's Issues

Error occurs when running npx react-native run-android

Run npx react-native run-android and see:

Jetifier found 936 file(s) to forward-jetify. Using 12 workers...
info JS server already running.
info Installing the app...

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: spawn ./gradlew EACCES
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
info Run CLI with --verbose flag for more details.

Solution is described at StackOverflow.

sudo chmod 755 android/gradlew

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.