flutter for mac安裝常見錯誤

2021-09-24 19:53:14 字數 1304 閱讀 7887

一、報錯:unable to locate android sdk

找不到sdk位置,配置.bash_profile中環境變數android_home

命令   cd ~

命令  open .bash_profile

編輯並儲存

export android_home=/users/這裡填你的電腦使用者名稱/documents/sdk //我的sdk位置

export path=$:$/platform-tools

export path=$:$/tools

export path=$:$/build-tools/28.0.3 //注意版本號

命令  source .bash_profile

二、報錯:android license status unknown.

嘗試以下方法,解決:

1.切換jdk,我原先jdk預設1.7,切換1.8後報錯改變(jdk版本也可能和sdk版本有關,只做參考)。

2.androidstudio中更新sdk。

經以上兩步之後,報錯取消,再次執行 flutter doctor ,結果提示

some android licenses not accepted.  to resolve this, run: flutter doctor --android-licenses

如下

3.執行 flutter doctor --android-licenses,提示安裝某些確實外掛程式,輸入y,多次詢問,輸入y

4.再次flutter doctor ,報錯消失了。

三、報錯:flutter plugin not installed,dart plugin not installed

androidstudio外掛程式未安裝

開啟android studio,androidstudio→preferences→plugins,在搜尋框中搜尋flutter外掛程式並安裝,會是安裝dart,選yes,重啟後生效。

安裝Docker(yum安裝)

確定你是centos7及以上版本 root 192 desktop cat etc redhat release centos linux release 7.2.1511 core 3.yum安裝gcc相關 yum y install gcc yum y install gcc c 4.解除安裝舊...

安裝 python python安裝

pyenv 多版本管理工具 1.linux安裝pyenv方式 git 安裝 1 安裝git yum install git y 2 安裝python編譯依賴 yum y install gcc make patch gdbm devel openssl devel sqlite devel read...

mysql安裝(安裝包安裝)

2 使用命令列 cmd 進入mysql的bin目錄下,初始化資料庫,執行mysqld initialize console console 表示在控制台輸出,不新增則不展示下面那些資訊 最後一行root localhost 後的hd ed4j s 就是臨時密碼,登入時會使用 注意 1 data目錄要...