/anidb-mobile

📱🍏 Rin Minase's Anime Database utilizing React Native compiled and deployed to GitHub Releases using Circle CI

Primary LanguageJavaScriptMIT LicenseMIT

Rin's AniDB Mobile (React Native)

Introduction

Add info here

Sadly, due to how the React Native CLI works, I was able to exclude android and ios folders from the repository, but regenerating these folders using the setup script would generate a new temporary project, then copy their respective android and ios folders to the main project. This seems to be an issue for now, and there seems to be no proper and clean solution for it for this version of React Native. [Source 1], [Source 2].

Getting Started

Pre-requisites

  1. Download and install Java JDK 8 on your system.

  2. Add Java's /bin folder to your PATH environmental variable.

    • for example: C:\Program Files\Java\jdk1.8.0_231\bin
  3. Download and install Android Studio, and make sure the following are checked:

    • Android SDK
    • Android SDK Platform
    • Android Virtual Device
  4. Open Android studio, and to the bottom left of the welcome page Configure then SDK Manager

  5. Check Android 9.0 (Pie) and clck OK.

    • This is because React Native requires Android 9.0 (Pie) to be installed instead of the latest
  6. Add ANDROID_HOME in your environmental variables with the Sdk folder.

    • for example: C:\Users\<user>\AppData\Local\Android\Sdk
  7. Add the Sdk/platform-tools folder to your PATH environmental variable.

    • for example: C:\Users\<user>\AppData\Local\Android\Sdk\platform-tools
  8. Download and install Yarn.

For a Slimmer environment setup, please follow the steps below instead. This opts out of using Android Studio if you do not plan on using it as your IDE to reduce the bloat on your project setup, but has more complexity on the setup process.

Running the project

  1. Download the latest Node version. This is marked as <version number> Current. Install it on your machine.

  2. Clone the project.

    git clone https://github.com/RinMinase/anidb-mobile.git
    cd anidb-mobile
    
  3. Run the setup script and install the necessary dependencies.

    yarn setup
    yarn install
    
  4. Run the Android Emulator from Android Studio or iOS Simulator from Xcode. Otherwise, connect your Android or iOS device and make sure USB Debugging is enabled.

  5. Install the dependencies then run the project

    yarn android    // For Android
    yarn ios        // For iOS
    

Re-running the project

  1. Run the Android Emulator from Android Studio or iOS Simulator from Xcode. Otherwise, connect your Android or iOS device and make sure USB Debugging is enabled.

  2. Install the dependencies then run the project

    yarn android    // For Android
    yarn ios        // For iOS
    

Slimmer environment setup without Android Studio

This setup opts out of using Android Studio if you do not plan on using it as your IDE, to reduce the bloat of your project setup.

  • Java JDK 8
  • Android SDK Manager
    • Anroid SDK Tools (v26.1.1)
    • Android Virtual Device / Emulator (v29.2.1)
    • Android Platform Tools (v29.0.5)
    • (If using an Intel Platform) Emulator Accelerator HAXM (v7.5.4)
    • Android Pie (9.0) SDK Platform

Versions above are listed as tested to be working. You can try to use other versions but I cannot guarantee if it would be fully working.

  1. Download and install Java JDK 8 on your system.

  2. Add Java's /bin folder to your PATH environmental variable.

    • for example: C:\Program Files\Java\jdk1.8.0_231\bin
  3. Download and install Android's command-line tools and unpack it in a location of your preference.

    • for example: C:\Users\<user>\AppData\Local\Android, where the Android folder should contain the tools folder extracted from the archive downloaded above
  4. Open a terminal window inside tools folder from the one you extracted earlier. Then download the essential packages using sdkmanager

    • sdkmanager platform-tools emulator
  5. Set your environmental variables

    • ANDROID_HOME = for example: C:\Users\<user>\AppData\Local\Android\Sdk
    • (Append to) PATH
      • Android\emulator
      • Android\platform-tools
      • Android\tools\bin
  6. Download the platform specific packages

    • sdkmanager "platforms;android-29 build-tools;20.0.3 system-images;android-29;default;x86"
  7. Create an Android Virtual Device (AVD), and assign any name to it (in the command below it's called android29)

    • avdmanager create avd --name android29 --package "system-images;android-29;default;x86"

    You will be asked if you want to alter some configurations. You can also modify these configurations later in the file config.ini, located in the avd folder

  8. (Optional) If you are running an Intel Platform, you could also install the Emulator Accelerator (HAXM)

    • sdkmanager "extras;intel;Hardware_Accelerated_Execution_Manager"
  9. Run the Android Emulator from the name you assigned to it from the command above

    • emulator -avd android29 or just emulator @android29

    The emulator may take some time to initialize for the first time. But if you have done correctly, the Android Emulator window should show.

Built with