flutter doctor 遇到的一些坑

1

C:\Users\Administrator>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [Version 10.0.17134.472], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 21.1.2)
**X Flutter requires Android SDK 28 and the Android BuildTools 28.0.3
To update using sdkmanager, run:**
**"D:\dev\android\sdk\tools\bin\sdkmanager" "platforms;android-28" "build-tools;28.0.3"**
or visit https://flutter.dev/setup/#android-setup for detailed instructions.
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[√] Android Studio (version 3.2)
[!] Connected device
! No devices available

打开SDK Manager 更新一下 platforms;android-28" "build-tools;28.0.3 。更新完成,继续

2

C:\Users\Administrator>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [Version 10.0.17134.472], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
**X Android license status unknown.**
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[√] Android Studio (version 3.2)
[!] Connected device
! No devices available

百度找到答案,运行下面命令。
Users/Android/sdk/tools/bin/sdkmanager --update**

错误提示如下:

Warning: An error occurred during installation: Failed to move away or delete existing target file: D:\dev\android\sdk\tools
Move it away manually and try again…
done

还是不行,答案在这里

https://www.jianshu.com/p/d2a0a1c39728

把sdk下面的tools文件夹,重命名一下tool或者随意,然后打开cmd,前往其目录下的bin\sdkmanager,不会去的请百度
执行–update,也就是你的X:\xxxxsdk\tool\bin\sdkmanager --update,执行

终于把tools目录搞定了。

再往下走

flutter doctor --android-licenses

一路 YES,

3

Error running Gradle: ProcessException: Process "C:\Users\Downloads\fluttermusic\android\gradlew.bat" exited abnormally:
Configure project :app
IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-2.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
IOException: https://dl.google.com/android/repository/addons_list-1.xml
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
Failed to download any source lists!
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"

FAILURE: Build failed with an exception.

Where:
Build file 'C:\Users\F2846804\Downloads\fluttermusic\android\build.gradle' line: 32

What went wrong:
A problem occurred evaluating root project 'android'.

A problem occurred configuring project ':app'.
Failed to find Build Tools revision 28.0.3

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 1s
Command: C:\Users\Downloads\fluttermusic\android\gradlew.bat app:properties

Finished with error: Please review your Gradle project setup in the android/ folder.

解决方法:
您可以尝试清除代理设置,找到如下文件(您电脑里的用户名可能不同):
C:\Users\Administrator.gradle\gradle.properties
右键点击,选择一个文本编辑器打开它,找到跟代理设置相关的行,注释或者删除。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

china-yun

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值