How to run React-Native Examples?

后端 未结 9 2155
暗喜
暗喜 2021-01-31 21:18

I can\'t find any instructions on how to install and run one of the other Examples provided in \'https://github.com/facebook/react-native/tree/master/Examples\' such as \'https:

9条回答
  •  情歌与酒
    2021-01-31 21:53

    On Windows 10 I had to do adb shell am start -n com.facebook.react.movies/.MoviesActivity to get the examples running. (make sure ANDROID_SDK\platform-tools is in path or run command with absolute path)

    So step by step I had to do:

    cd react-native
    
    ./gradlew :Examples:Movies:android:app:installDebug
    
    adb shell am start -n com.facebook.react.movies/.MoviesActivity
    
    ./packager/packager.sh
    

    or

    ./gradlew :Examples:UIExplorer:android:app:installDebug
    
    adb shell am start -n com.facebook.react.uiapp/.UIExplorerActivity
    
    ./packager/packager.sh
    

提交回复
热议问题