xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Windows 10 & React Native & Android

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

https://gradle.org/help/

not running an AVD bug

solution

OK

https://stackoverflow.com/questions/32634352/react-native-android-build-failed-sdk-location-not-found

H:\Android-SDK

sdk.dir = H:\Android-SDK

  1. Go to the android/ directory of your react-native project
  2. 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-SDK\platform-tools

https://stackoverflow.com/questions/20564514/adb-is-not-recognized-as-an-internal-or-external-command-operable-program-or

# global
setx PATH "%PATH%;C:\Program Files\android-sdk-windows\platform-tools"

# session
set PATH=%PATH%;C:\Program Files\android-sdk-windows\platform-tools
set PATH=%PATH%;H:\Android-SDK\platform-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:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk

$ H:\Android-SDK\platform-tools

Android 9 (Pie)

relaod

⌘ + M & Ctrl+M

  1. manually reload

  2. auto reload

  3. hot reload

https://facebook.github.io/react-native/docs/debugging#reloading-javascript

https://facebook.github.io/react-native/docs/debugging#enabling-keyboard-shortcuts


posted @ 2019-04-23 17:19  xgqfrms  阅读(393)  评论(5编辑  收藏  举报