记一次运行 react native 项目创建过程

D:\code\react-native>npx react-native init nbseedapp --template react-native-template-typescript

###### ######
### #### #### ###
## ### ### ##
## #### ##
## #### ##
## ## ## ##
## ### ### ##
## ######################## ##
###### ### ### ######
### ## ## ## ## ###
### ## ### #### ### ## ###
## #### ######## #### ##
## ### ########## ### ##
## #### ######## #### ##
### ## ### #### ### ## ###
### ## ## ## ## ###
###### ### ### ######
## ######################## ##
## ### ### ##
## ## ## ##
## #### ##
## #### ##
## ### ### ##
### #### #### ###
###### ######


Welcome to React Native!
Learn once, write anywhere

√ Downloading template
√ Copying template
√ Processing template
√ Installing dependencies


Run instructions for Android:
• Have an Android emulator running (quickest way to get started), or a device connected.
• cd "D:\code\react-native\nbseedapp" && npx react-native run-android

Run instructions for Windows:
• See https://aka.ms/ReactNativeGuideWindows for the latest up-to-date instructions.

 

D:\code\react-native>cd nbseedapp

D:\code\react-native\nbseedapp>code .

D:\code\react-native\nbseedapp>

 

经过上面的步骤,项目就已经可以使用了。

 

 

$ react-native run-android

 

D:\code\react-native\nbseedapp>yarn android
yarn run v1.22.19
$ react-native run-android
info JS server already running.
info Installing the app...

> Task :app:installDebug
Installing APK 'app-debug.apk' on 'CHEN-RH(AVD) - 11' for :app:debug
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 9s
38 actionable tasks: 2 executed, 36 up-to-date
info Connecting to the development server...
8081
info Starting the app on "emulator-5554"...
Starting: Intent { cmp=com.nbseedapp/.MainActivity }
Done in 15.71s.

 

 

posted @ 2022-09-12 09:35  妖精代码  阅读(155)  评论(0)    收藏  举报