We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
编写相应的index.android.js或index.ios.js可在模拟器实时查看编写效果。 刷新看效果:按两下r 开启自动刷新:打开模拟器的App内的开发菜单:Command+m,选择“Enable Hot Reload”
用usb连接手机,并打开USB调试开关。
android5.0及以上,运行,#adb reverse tcp:8081 tcp:8081
android5.0以下,首先确认手机和电脑在同一wifi环境,在电脑上运行 #react-native run-android,会看到红屏错误提示。
摇晃手机,点击’Dev Settings’->点击’Debug server host for device’, 输入电脑的IP和端口(8081)。回到开发者菜单,reload。
此时可以在电脑上行修改代码,摇晃手机,点击’reload’以实时查看下效果。
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore MYAPP_RELEASE_KEY_ALIAS=my-key-alias MYAPP_RELEASE_STORE_PASSWORD=***** MYAPP_RELEASE_KEY_PASSWORD=*****
android { ... defaultConfig { ... } signingConfigs { release { storeFile file(MYAPP_RELEASE_STORE_FILE) storePassword MYAPP_RELEASE_STORE_PASSWORD keyAlias MYAPP_RELEASE_KEY_ALIAS keyPassword MYAPP_RELEASE_KEY_PASSWORD } } buildTypes { release { ... signingConfig signingConfigs.release } } }
安装react-native-git-upgrade工具模块: $ npm install -g react-native-git-upgrade 运行安装命令: $ react-native-git-upgrade 或 $ react-native-git-upgrade X.Y.Z(版本号)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
搭建启动:
编写前端代码
编写相应的index.android.js或index.ios.js可在模拟器实时查看编写效果。
刷新看效果:按两下r
开启自动刷新:打开模拟器的App内的开发菜单:Command+m,选择“Enable Hot Reload”
真机设备上运行,以android为例:
用usb连接手机,并打开USB调试开关。
android5.0及以上,运行,#adb reverse tcp:8081 tcp:8081
android5.0以下,首先确认手机和电脑在同一wifi环境,在电脑上运行 #react-native run-android,会看到红屏错误提示。
摇晃手机,点击’Dev Settings’->点击’Debug server host for device’, 输入电脑的IP和端口(8081)。回到开发者菜单,reload。
此时可以在电脑上行修改代码,摇晃手机,点击’reload’以实时查看下效果。
打包apk
#keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000, 注意记住你执行该命令过程中设置的密码。
升级
安装react-native-git-upgrade工具模块:
$ npm install -g react-native-git-upgrade
运行安装命令:
$ react-native-git-upgrade
或
$ react-native-git-upgrade X.Y.Z(版本号)
The text was updated successfully, but these errors were encountered: