🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# Flutter框架 flutter中文网 <https://flutterchina.club/> flutter实战电子书 <https://book.flutterchina.club/> ## 配置开发环境,用的Android studio 4.0 设置镜像环境变量,Mac/Linux直接执行命令,win下添加环境变量,win需要安装Git for Windows,先设置这两个环境变量 ``` <pre class="calibre14">``` export PUB_HOSTED_URL<span class="token">=</span>https<span class="token2">:</span><span class="token">/</span><span class="token">/</span>pub<span class="token2">.</span>flutter<span class="token">-</span>io<span class="token2">.</span>cn export FLUTTER_STORAGE_BASE_URL<span class="token">=</span>https<span class="token2">:</span><span class="token">/</span><span class="token">/</span>storage<span class="token2">.</span>flutter<span class="token">-</span>io<span class="token2">.</span>cn ``` ``` #### 安装flutter 下载flutter,<https://flutter.cn/docs/get-started/install/windows> 解压到`C:\app\flutter` #### 安装Android studio 下载android studio <https://developer.android.google.cn/studio/#downloads> 下载zip版本即可 解压到 `C:\app\android-studio` 接着**安装flutter和Dart插件** 1 . JAVA\_HOME环境变量设置 `C:\app\android-studio\jre` 2\. ANDROID\_HOME环境变量 `C:\app\Androidsdk` 3\. path设置 `C:\app\flutter\bin` 然后运行`flutter doctor` - 检测显示 Android license status unknown 运行 `flutter doctor --android-licenses` 一路yes - 安装Android SDK,连上安卓手机下载对应sdk,在真机上测试 - Android studio汉化插件 <https://github.com/pingfangx/TranslatorX> - 编译错误 修改:flutter/packages/flutter\_tools/gradle/resolve\_dependencies.gradle flutter/packages/flutter\_tools/gradle/aar\_init\_script.gradle flutter/packages/flutter\_tools/gradle/flutter.gradle,这三个文件中<https://storage.googleapis.com/download.flutter.io>为<http://download.flutter.io>即可 - 夜神模拟器 下载好以后,在安装目录`C:\Program Files (x86)\Nox\bin`执行`nox_adb.exe connect 127.0.0.1:62001`