Ubuntu Flutter 环境配置

2020-04-29  本文已影响0人  侦探小柯南

遇到的问题

1 Unable to locate a development device; please run 'flutter doctor' for infor

解决链接
https://stackoverflow.com/questions/53456545/unable-to-locate-a-development-device-please-run-flutter-doctor-but-doctor

里面有这么一条回答:(设置解决 ,前提 是使用flutter doctor 所有条件都已经满足了)
In Android Studio, ensure that the API level of your Project SDK (File->Project Structure) <= of the API level of your AVD.

一 环境变量配置

~/.bashrc 中的配置:

flutter PATH

export FLUTTER_PATH="/opt/flutter"

java PATH

export JAVA_HOME="/opt/java/jdk1.8.0_181"

sdk PATH

export ANDROID_HOME="/opt/sdk"
export PATH="PATH:{JAVA_HOME}/bin:{FLUTTER_PATH}/bin:ANDROID_HOME:ANDROID_HOME/build-tools:ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"

二 Android studio 安装 dart 和flutter plugin

上一篇下一篇

猜你喜欢

热点阅读