yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
Was asked which JDK should be installed: opted for the default (jdk-openjdk)
No clue if this will work or not (React Native says it needs "8" and the default is "13"... I think)
No worries
No worries
yaourt -S genymotion
Genymotion will tell you need the following modules loaded:
- vboxdrv
- vboxnetflt
- vboxnetadp
- vboxpci
Little tip: vboxpci has been dropped so if you try to "modinfo" it, it will fail
Ensure the modules are loaded
modinfo vboxdrv
modinfo vboxnetflt
modinfo vboxnetadp
If not, use modprobe
to start them. Otherwise, look it up.
Now is a good time to restart (because genymotion and virtualbox)
npm install -g react-native-cli
Create a directory and init
a new react-native project
react-native init mobile_client
sit back and relax... this could take a while
Welcome Back
"cd" into the project directory
react-native doctor
Selecting the "default" JDK was the wrong the choice. Stick with jdk8
(its what works)
pacman -S jdk8-openjdk
pacman -Rn jdk-openjdk
Currently (as of this writing), react-native likes 28.0.3
skdmanager "platforms;android-28"
sdkmanager "build-tools;28.0.3"
I (clearly) have no idea what is happening here so... if you use an IDE or GUI, use those instead to manage the SDK packages and tools
Open a separate terminal or shell in the same directory
npm start
In the original (or yet another) terminal/shell run
react-native run-android
LOL, not so fast!
Interesting... no emulators found. This is clearly different from iOS and Mac which will launch the simulator if one isn't already running. To end the suspense, it will fail because there is no simulator/emulator
Pro Tip: dump Genymotion for now (username and password for this shit?)
Just download Android SDK Emulator
sdkmanager emulator
avdmanager create avd -n simple_28
This failed hard with a cryptic "No package"
So back to sdkmanager
sdkmanager "system-images;android-28;google_apis;x86"
Go and get a meal or something... this might take a long time
I am more than certain that I have done this in an obtuse manner. Perhaps there is a better (more specific) way to download a package or just a single package
avdmanager create avd -n simple_28 -k "system-images;android-28;google_apis;x86"
emulator -avd simple_28
Surprise! No joy! Failed with a (PANIC)
Turns out to be the wrong "emulator" is being called
Silly me /s
The correct emulator should be {sdk_root}/emulator/emulator
instead it is {sdk_root}/tools/emulator
There are a couple of ways to change which emulator
is used but I leave that to you
With that out of the way...
Profit