赞
踩
说明点:
进行尝试flutter编译,主要问题是找不到android sdk位置,
flutter doctor
flutter doctor --android-licenses
Android sdkmanager tool not found
(/Users/xx/android-sdk/tools/bin/sdkmanager).
Try re-installing or updating your Android SDK,
visit https://flutter.io/setup/#android-setup for detailed instructions.
解决过程,并没有发现C:\Users\fjs\AppData\Local\Android\Sdk\tools 文件夹,参考sdk下载图, 安装 sdk tools
1.准备好dart 和flutter安装包
dart 官方下载地址
https://dart.dev/tools/sdk/archive
由于需要外网才能够下载。
https://storage.googleapis.com/dart-archive/channels/stable/release/2.7.1/sdk/dartsdk-windows-x64-release.zip
可以迅雷下载: 可以csdn 下载 搜索 dartsdk dartsdk-windows-x64-release.zip 解压到指定目录dart 比如d:\fjs_dev\dart\dart-sdk 下载 https://flutter.dev/docs/development/tools/sdk/releases#windows flutter_windows_v1.12.13+hotfix.8-stable.zip 解压到flutter 配置环境变量: PUB_HOSTED_URL = https://pub.flutter-io.cn FLUTTER_STORAGE_BASE_URL = https://storage.flutter-io.cn 配置path 环境变量路径 ;D:\fjs_dev\dart\dart-sdk\bin;D:\fjs_dev\flutter\bin; 安装 vscode 安装扩展插件 Chinese ,dart ,flutter ,flutter widget ,code runner 如果右键出现乱码,则在 设置-->扩展-->Run Code cofig--> Map的编辑中添加 如下一段话.可以百度搜索code runner 乱码 "code-runner.runInTerminal": true,
测试dart 是否ok
配置java环境:
安装java1.8版本以上的版本 jdk-8u241-windows-x64.exe
配置环境变量:
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_241
ANDROID_HOME = C:\Users\fjs\AppData\Local\Android\Sdk
C:\Users\fjs\AppData\Local\Android\Sdk\platform-tools
path 环境变量:
;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;d:\Program Files\Nox\bin;
安装 android-studio-ide-192.6241897-windows.exe,默认即可
安装夜神安卓模拟器 nox_setup_v6.6.0.3_full.exe
关闭android-studio-ide,再打开项目D:\code_space\fjs.com\flutter\flutter_app\android,等待编译中 cmd: cd c:\Program Files\Nox\bin nox_adb.exe connect 127.0.0.1:62001 flutter doctor --android-licenses flutter doctor flutter doctor --android-licenses flutter run
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。