Windows 10 & React Native & Android
https://facebook.github.io/react-native/docs/getting-started
https://reactnative.cn/docs/getting-started.html
ANDROID_HOME
env
Android Virtual Device (AVD)
https://developer.android.com/studio/run/managing-avds.html
not running an AVD bug
solution
OK
H:Android-SDK
sdk.dir = H:Android-SDK
- Go to the
android/
directory of your react-native project - Create a file called
local.properties
with this line:
# macOS / Linux
sdk.dir = /Users/USERNAME/Library/Android/sdk
# Windows
sdk.dir = C:\Users\USERNAME\AppData\Local\Android\sdk
adb bug
PATH env bug
solutions
abd
# PATH
'adb' is not recognized as an internal or external command,
H:Android-SDKplatform-tools
# global
setx PATH "%PATH%;C:Program Filesandroid-sdk-windowsplatform-tools"
# session
set PATH=%PATH%;C:Program Filesandroid-sdk-windowsplatform-tools
set PATH=%PATH%;H:Android-SDKplatform-tools
Android
https://facebook.github.io/react-native/docs/getting-started
https://chocolatey.org/
https://github.com/chocolatey
https://www.python.org/downloads/release/python-2716/
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
# Node, Python2, JDK
$ choco install -y nodejs.install python2 jdk8
# ANDROID_HOME
# c:UsersYOUR_USERNAMEAppDataLocalAndroidSdk
$ H:Android-SDKplatform-tools
Android 9 (Pie)
relaod
⌘ + M
& Ctrl+M
-
manually reload
-
auto reload
-
hot reload
https://facebook.github.io/react-native/docs/debugging#reloading-javascript
https://facebook.github.io/react-native/docs/debugging#enabling-keyboard-shortcuts