Add info here
Sadly, due to how the React Native CLI works, I was able to exclude
android
andios
folders from the repository, but regenerating these folders using the setup script would generate a new temporary project, then copy their respectiveandroid
andios
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].
- Java JDK 8
- Android Studio
- Android Device
- Yarn
-
Download and install Java JDK 8 on your system.
-
Add Java's
/bin
folder to yourPATH
environmental variable.- for example:
C:\Program Files\Java\jdk1.8.0_231\bin
- for example:
-
Download and install Android Studio, and make sure the following are checked:
- Android SDK
- Android SDK Platform
- Android Virtual Device
-
Open Android studio, and to the bottom left of the welcome page
Configure
thenSDK Manager
-
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
-
Add
ANDROID_HOME
in your environmental variables with theSdk
folder.- for example:
C:\Users\<user>\AppData\Local\Android\Sdk
- for example:
-
Add the
Sdk/platform-tools
folder to yourPATH
environmental variable.- for example:
C:\Users\<user>\AppData\Local\Android\Sdk\platform-tools
- for example:
-
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.
-
Download the latest Node version. This is marked as
<version number> Current
. Install it on your machine. -
Clone the project.
git clone https://github.com/RinMinase/anidb-mobile.git cd anidb-mobile
-
Run the setup script and install the necessary dependencies.
yarn setup yarn install
-
Run the
Android Emulator
fromAndroid Studio
oriOS Simulator
fromXcode
. Otherwise, connect your Android or iOS device and make sureUSB Debugging
is enabled. -
Install the dependencies then run the project
yarn android // For Android yarn ios // For iOS
-
Run the
Android Emulator
fromAndroid Studio
oriOS Simulator
fromXcode
. Otherwise, connect your Android or iOS device and make sureUSB Debugging
is enabled. -
Install the dependencies then run the project
yarn android // For Android yarn ios // For iOS
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.
-
Download and install Java JDK 8 on your system.
-
Add Java's
/bin
folder to yourPATH
environmental variable.- for example:
C:\Program Files\Java\jdk1.8.0_231\bin
- for example:
-
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 theAndroid
folder should contain thetools
folder extracted from the archive downloaded above
- for example:
-
Open a terminal window inside
tools
folder from the one you extracted earlier. Then download the essential packages usingsdkmanager
sdkmanager platform-tools emulator
-
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
- ANDROID_HOME = for example:
-
Download the platform specific packages
sdkmanager "platforms;android-29 build-tools;20.0.3 system-images;android-29;default;x86"
-
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
-
(Optional) If you are running an Intel Platform, you could also install the Emulator Accelerator (HAXM)
sdkmanager "extras;intel;Hardware_Accelerated_Execution_Manager"
-
Run the Android Emulator from the name you assigned to it from the command above
emulator -avd android29
or justemulator @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.
- React Native - Mobile Framework
- Android - Platform
- Babel ES10 / ES2019 Preset - Syntax and compiler
- JSS (CSS in JS) - CSS pre-processor
- Gradle - Android bundler
- Circle CI - Continuous Integration (CI) service
- Yarn - Package Manager