Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Toddle E-commerce App

This is a simple e-commerce mobile application built with React Native.

Getting Started

Prerequisites

  • Node.js (v18 or later)
  • npm or yarn
  • React Native CLI
  • Android Studio (for Android development)
  • Xcode (for iOS development)

Installation & Setup

  1. Navigate to the project directory:

    cd ToddleEcommerce
  2. Install JavaScript dependencies:

    npm install
  3. Install iOS dependencies (for iOS development):

    First, ensure you have CocoaPods installed. If not, you can install it using Homebrew:

    brew install cocoapods

    Then, navigate to the ios directory and install the pods:

    cd ios && pod install

Running the Application

For Android

  1. Make sure you have an Android emulator running or a device connected.
  2. Run the following command from the project root (ToddleEcommerce):
    npm run android

For iOS

  1. Make sure you have an iOS simulator running or a device connected.
  2. Run the following command from the project root (ToddleEcommerce):
    npm run ios

Important Note on Icons

The application uses placeholder icons. To see the intended icons, you will need to add the following files to the ToddleEcommerce/src/assets/icons directory:

  • menu.png
  • cart.png
  • filter.png
  • search.png

Troubleshooting

Android: adb: command not found or Unable to locate a Java Runtime

These errors indicate that your Android development environment is not set up correctly. Follow these steps to fix it:

  1. Install a Java Development Kit (JDK): React Native requires a specific version of the JDK. We recommend using OpenJDK 11. You can install it via Homebrew:

    brew tap homebrew/cask-versions
    brew install --cask zulu11
  2. Set up Environment Variables: You need to set the JAVA_HOME and ANDROID_HOME environment variables. Add the following lines to your shell configuration file (e.g., ~/.zshrc or ~/.bash_profile):

    export ANDROID_HOME=$HOME/Library/Android/sdk
    export PATH=$PATH:$ANDROID_HOME/emulator
    export PATH=$PATH:$ANDROID_HOME/platform-tools
    export JAVA_HOME=$(/usr/libexec/java_home -v 11)
    export PATH=$JAVA_HOME/bin:$PATH

    After adding these lines, reload your shell configuration:

    source ~/.zshrc 
    # or
    source ~/.bash_profile
  3. Verify the Setup: Run npx react-native doctor to check if your environment is configured correctly. It will help you identify and fix any remaining issues.

For more detailed instructions, please refer to the official React Native Environment Setup guide.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages