Follow the instructions described below if you want to setup RuinaMain using Windows and Android Studio.
- Follow this react native tutorial (select React Native CLI Quickstart, Windows, and Android)
- Make sure to select Android 9 (Pie) and Android SDK Platform 28 instead of the new versions. This can be done by following the green highlight portion in this google document
- We recommend using nvm-windows to install Node.js, so you can easily install multiple versions and switch between them. Install the latest Node.js version via
nvm install latest [arch]. Don't forget to actually pick a Node.js version once you install it vianvm use <version> [arch]. Confirm you have Node.js installed by typingnode --versionin the command prompt - Since we use Gradle 5.5, as of now, you should install JDK version 11. You can download the Windows zip file for JDK 11 here. Extract the zip folder into
C:\Program Files\Java\and then addC:\Program Files\Java\jdk-11to the SystemPathvariable. To easily switch between different JDK version, I would recommend following this tutorial. Confirm you have JDK installed by typingjava -versionin the command prompt - In case you need to install Gradle, you can do that here
- Follow the first two steps of this tutorial to connect a tablet with Android (select Android and Windows)
- Clone the
RuinaMainrepo
- In a terminal,
cdinto the main directory of the repo rmdir /s node_modulesif there exists anode_modulesfolder in the repoyarn install(ifyarnis not recognized as a command then runnpm install -g yarnin a command prompt run as administrator)
- In order to get the app running, you need to add the required Anyline config files
- To add them, create a new folder called
anylineConfigsin yourRuinaMaindirectory - Download all the files from here, and put them in the
anylineConfigsfolder
-
Rebuild the Android folder with the following commands
cd androidgradlew cleancd ..
-
Run app via
npx react-native run-androidwithin the mainRuinaMaindirectory (make sure your tablet is plugged in and registered as a device when you typeadb devicesinto a terminal)
Note: using an emulator requires the same steps as the above section but instead of doing step 2, you have to set up the emulator. You can do this by following the "Using a virtual device" section in the react native setup tutorial (select React Native CLI Quickstart, Windows, and Android). Don't forget to launch your Android Virtual Device before running npx react-native run-android!
