Rekord
文章34
标签24
分类4
flutter 初体验

flutter 初体验

约109字 预计需要1分钟

安装 Flutter SDK


flutter doctor -v
# 关闭谷歌分析
flutter config --no-analytics
dart --disable-analytics

flutter doctor --android-licenses

加速 gradle 依赖拉取


// google()
// mavenCentral()
maven { 
    url 'http://maven.aliyun.com/nexus/content/repositories/google' 
    allowInsecureProtocol = true
}
maven { 
    url 'http://maven.aliyun.com/nexus/content/groups/public/' 
    allowInsecureProtocol = true    
}

Solve Flutter Build Error


flutter pub upgrade --major-versions
flutter clean
cd android/
.\gradlew clean
.\gradlew build

参考

https://docs.flutter.dev/
https://stackoverflow.com/questions/59516408/flutter-app-stuck-at-running-gradle-task-assembledebug
https://stackoverflow.com/questions/54552962/flutter-build-error-process-command-e-flutter-apps-flutter-bin-flutter-bat

本文作者:Rekord
本文链接:https://sxrekord.com/flutter_first_experience/
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可
×