flutter 安装以及遇到的坑

flutter 安装遇到的坑

1.网站和教程

flutter 中文网

也可以看这个

2.Android studio 找不到 flutter 插件

参考

3.Android SDK file not found

参考

flutter config --android-sdk /Users/sunchengxiu/Library/Android/sdk/

4.Android SDK file not found

打开 Android studio,会提示安装,慢慢等待吧。

5.Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

执行命令:flutter doctor --android-licenses

一直y就行

6. sudo gem install cocoapods

sudo gem install cocoapods
Password:
Fetching: concurrent-ruby-1.1.6.gem (100%)
Successfully installed concurrent-ruby-1.1.6
Fetching: httpclient-2.8.3.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
➜ ~ sudo gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.

改为 : sudo gem install -n /usr/local/bin cocoapods

8.Waiting for another flutter command to release the startup lock...

参考

9.Running "flutter pub get" in flutter_app...

参考

10.Error running pod install Error launching application on iPhone 11 Pro Max.

参考

注意:podfile文件中一定要指定master源,因为现在默认是trunk源

source 'https://github.com/CocoaPods/Specs.git'

11.andrio studio 安装 gradle

参考

12.flutter run卡在Running Gradle task 'assembleDebug'...

参考

13.Connect to 127.0.0.1:1087 [/127.0.0.1] failed: Connection refused (Connection refused)

参考

14. android Studio 出现:Unable to resolve dependency for ':app@debug/compileClasspath'

参考

15. flutter Could not build the application for the simulator. Error launching a

先清一下 Xcode 缓存

flutter clean

flutter run

16. 真机运行

flutter run -d deviceid

17 app_plugin_loader.gradle' as it does not exist.

更新 flutter sdk flutter/bin/flutter upgrade

最后

flutter doctor


Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.14.6 18G3020, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.6)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Community Edition (version 2019.1.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.45.0)
[✓] Connected device (1 available)

! Doctor found issues in 2 categories.

成功了

18. flutter 导入第三方 SDK [参考](https://blog.csdn.net/Crazy_SunShine/article/details/80355291

)

  1. flutter ... 文件夹更改配置 参考

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值