GithubHelp home page GithubHelp logo

install_flutter_macos_intel's Introduction

Install Flutter on macOS (intel)

Install Homebrew:

 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install FVM (Flutter Version Management):

 brew tap leoafarias/fvm
 brew install fvm
 
 $ pub global activate fvm

下記を .bashrc や .zshrc に記述
export PATH="$PATH":"$HOME/.pub-cache/bin"
export PATH="$PATH":"$HOME/fvm/default/bin"

$ fvm install 2.5.2
$ fvm use 2.5.2 --global

Install FlutterSDK:

 fvm install flutter_version

Sets Flutter SDK Version as a global:

 fvm global flutter_version

Install Java:

 brew install java
 sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

Install Android Studio (AS):

Opent AS
1. Go to the: Preferences ~> Appearance & Behavio ~> System Settings ~> Android SDK 
	~> Click tab SDK Tools ~> click “Android SDK Command-line Tools” and “Android SDK Build-Tools”
	~> Apply (wait install) ~> OK.

2. Go to the: Preferences ~> Plugins: search and install “Dart”, “Flutter”, “Flutter Intl”.

3. Restart AS.

Install xcode:

Install from Mac App Store
 sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
 sudo xcodebuild -runFirstLaunch
 sudo xcodebuild -license
 sudo gem install cocoapods

Add path to .zshrc (macOS Big Sur) file:

Opent .zshrc file:
 nano .zshrc
Copy and paste:
 export PATH="$PATH":"$HOME/.pub-cache/bin"
 export PATH="$PATH":"$HOME/fvm/default/bin"
 export ANDROID_HOME=$HOME/Library/Android/sdk
 export PATH=$PATH:$ANDROID_HOME/emulator
 export PATH=$PATH:$ANDROID_HOME/platform-tools
 export PATH=$PATH:$ANDROID_HOME/tools
 export PATH=$PATH:$ANDROID_HOME/tools/bin
 export JAVA_HOME=$(/usr/libexec/java_home)
Sava and exit (^O ~> Enter ~> ^X)
Enter the value:
 source .zshrc

Run flutter doctor

Android signing licenses
 flutter doctor --android-licenses
Check error:
Flutter doctor
Fix error "Unable to find bundled Java version":
 cd /Applications/Android\ Studio.app/Contents/jre
 ln -s ../jre jdk
 ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
Fix error "Flutter plugin not installed" and "Dart plugin not installed":
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1

install_flutter_macos_intel's People

Contributors

vanvixi avatar vantruong1094 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.