欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 新闻 > 资讯 > Mac iOS、Android、Flutter、React Native开发环境配置

Mac iOS、Android、Flutter、React Native开发环境配置

2024/12/31 1:21:17 来源:https://blog.csdn.net/qq_25639809/article/details/144600410  浏览:    关键词:Mac iOS、Android、Flutter、React Native开发环境配置

1.安装XCode
https://apps.apple.com/cn/app/xcode/id497799835?mt=12

2.安装Android Studio
https://developer.android.google.cn/studio

3.安装brew
参考地址:https://www.jianshu.com/p/22122a1d4474

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
(按提示操作…)
brew -v
(Homebrew 4.4.4)

4.安装ruby

brew install rubyvi ~/.zshrc/**
#ruby
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
**/source ~/.zshrcruby -v
(ruby 3.0.7)

5.安装cocoapods

安装最新版

brew install cocoapods
pod --version
(1.16.2)

指定版本安装

gem -v
(3.5.9)
gem sources
gem sources -a http://mirrors.aliyun.com/rubygems/
gem search cocoapods
sudo gem install -n /usr/local/bin cocoapods -v 1.11.3
pod --version
(1.11.3)

使用

pod repo
pod repo update
pod install

6.安装java

brew install --cask zulu@17
javac -version

7.安装node

brew install watchman
brew install node@18vi ~/.zshrc/**
export PATH="/opt/homebrew/opt/node@18/bin:$PATH"export LDFLAGS="-L/opt/homebrew/opt/node@18/lib"
export CPPFLAGS="-I/opt/homebrew/opt/node@18/include"
**/source ~/.zshrcnode --version
(v18.20.5)

8.安装flutter

brew tap leoafarias/fvm
brew install fvm 
fvm —version
fvm install 2.8.1
fvm list

9.安装adb

brew install android-platform-tools
adb version
(35.0.2)

10.配置环境变量

vi ~/.zshrc/**
# flutter sdk
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=${PATH}:/Users/lax/fvm/default/bin# android sdk
export ANDROID_Home=/Users/lax/Library/Android/sdk
export PATH=${PATH}:ANDROID_Home/tools
export PATH=${PATH}:ANDROID_Home/platform-tools# java sdk
export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin# apksigner
export AAPT_HOME=$ANDROID_Home/build-tools/34.0.0
export PATH=$PATH:$AAPT_HOME# ruby
export PATH="/opt/homebrew/opt/ruby@3.0/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/ruby@3.0/lib"
export CPPFLAGS="-I/opt/homebrew/opt/ruby@3.0/include"# node
export PATH="/opt/homebrew/opt/node@18/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/node@18/lib"
export CPPFLAGS="-I/opt/homebrew/opt/node@18/include"
**/source .zshrc

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com