最新公告
  • 欢迎您光临起源地模板网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境!立即加入钻石VIP
  • react-native 入门指南《1》

    正文概述 掘金(快乐丁工人)   2020-12-17   814

     有道是 一天不学习,我就很开心……

    但身边过于优秀的同事——老王,给了我很大的压力。 

     我决定开始学RN…… 

     虽然现在学时间不算早,西卡西,学不可以已矣……哎嗨哎嗨呦……

     闲言少叙,开工。 

     0.打开说明书 

    1. npx react-native init native01 

     2. yarn ios 上面npx 这里 yarn  

    error Could not find "Podfile.lock" at ……native01/ios/Podfile.lock. Did you run "pod install" in iOS directory?

    cd ios && pod install  

    ten years later

    3.UnhandledPromiseRejectionWarning: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template. Please try again manually: "cd ./native01/ios && pod install". 

    很明显姿势不对,再来一次。

    cd ios && pod install  

     ten minutes late

     4. 报错 ,这个命令不纯啊,两次报错竟然不一样?!

     [!] /bin/bash -c 

     set -e #!/bin/bash 

    看来是需要安装xcode

    嗯,走起。

    5.不能将 xcode 安装在 “Macintosh HD” 上,因为需要 macOS v10.15.4 或更高版本 

    下载地址

    不早说,我三个小时没有了。 

    不能安装10.2.1,三个小时

    不能安装10以上,一个小时

      ten years later 

     9.4.1下载完成

     9.4.1解压

    ten years later

     6. 安装提示版本冲突

    移除之前版本的xcode 

     7. Unable to boot device because it cannot be located on disk

     运行 xcrun simctl erase all

     8. poodfile.lock can't find …… 

     sudo gem install cocoapods cd ios && pod install 

    487s后……

     9. Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65

    rm -rf node_modules && yarn cache clean

    rm -rf ~/.rncache

    yarn install react-native run-ios

    fail again……

    大吉

    rm -rf project

    10.我就很气了,负重致远 不可急躁 不可急躁

    npx react-native init project

    cd project && npx react-native run-ios

    11.Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening native01.xcworkspace. Run CLI with --verbose flag for more details.

    老铁,你可以的呀。

    well done

    rm -rf project

    shutdown now

    告辞  不学了,谁学谁是狗。

    1. 汪汪汪……

    升级mac big sur

    1. 系统下完,appstore 下xcode,四点的灯光再看一遍。

    yarn ios

    14.xcrun: error: active developer path ("……/Xcode.app/Contents/Developer") does not exist Use

    睡了,睡了,50岁的身体,扛不住了。

    15.yarn ios

    `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools. See `man xcode-select` for more details. xcode-select --install sudo xcode-select --switch /applications/Xcode.app yarn ios success Successfully launched the app on the simulator

    ✨ Done in 489.28s.

    看到这行字,留下了泪水……

    16.error: Can't find the 'node' binary to build the React Native bundle. If you……

    呦吼,小伙子你可以呀。

    治不了太君还……

    nvm下的node需要建立软连接

    ln -s $(which node) /usr/local/bin/node

    17.yarn ios

    success Successfully launched the app on the simulator ✨ Done in 16.50s.

    嗯,这下可以吹高级RN工程师了。

    react-native 入门指南《1》

    RN环境有点复杂……

    嗯,有亿点吧……

    react-native 入门指南《1》


    起源地下载网 » react-native 入门指南《1》

    常见问题FAQ

    免费下载或者VIP会员专享资源能否直接商用?
    本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
    提示下载完但解压或打开不了?
    最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。若排除这种情况,可在对应资源底部留言,或 联络我们.。
    找不到素材资源介绍文章里的示例图片?
    对于PPT,KEY,Mockups,APP,网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。
    模板不会安装或需要功能定制以及二次开发?
    请QQ联系我们

    发表评论

    还没有评论,快来抢沙发吧!

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者

    请选择支付方式

    ×
    迅虎支付宝
    迅虎微信
    支付宝当面付
    余额支付
    ×
    微信扫码支付 0 元