Open CarGuo opened 6 years ago
flutter 环境配置
1、 sdk
git clone -b beta https://github.com/flutter/flutter.git
git checkout v0.7.0 //切换到.0.7.0版本
2、配置环境代理
win配置到环境变量
mac配置到 .bash_profile 文件(用户名目录下的隐藏文件,可以通过命令行 open .bash_profile 打包)
注意,目前代理下会出现问题,科学上网吧。
3、检查环境
重新打开命令行并执行
flutter doctor
4、同步项目的包
flutter packages get
5、androd和ios环境是否配置
@tonyhelloworld
/// Shrinks the tap target size to the minimum provided by the Material
/// specification.
接口Http status error [422]
@joexchen 你需要配置正确你github 申请的应用id和sercet
配置了的,我能正常登陆GitHub网页端,但是跑起来,就报422
配置了的,我能正常登陆GitHub网页端,但是跑起来,就报422
我也遇到相同的问题,请问你是否已经解决这个问题??
目前已知442问题是由于 page 请求超出了 数据的最大page 导致的
配置了的,我能正常登陆GitHub网页端,但是跑起来,就报422 此处的CLIENT_ID和CLIENTSECRET不是GitHub的账号和密码,而是你注册的application的Client ID和Client Secret。在github上申请OAuth App的步骤:进入个人的Github首页,Settings->Applications->Developer applications->Register a new application,然后在下图中输入信息,信息输入完毕后点击"Register application"按钮。如下图所示 结案!楼主可以关闭该issue了O(∩∩)O哈哈~
I met a problem that api returned exception 422.
大佬帮忙看下呗,什么原因
Error output from CocoaPods: ↳ [!] The version of CocoaPods used to generate the lockfile (1.5.3) is higher than the version of the current executable (1.5.0). Incompatibility issues may arise.
[!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install Error launching application on iPhone XR.
Resolving dependencies of Podfile
[!] CocoaPods could not find compatible versions for pod "lottie-ios":
In snapshot (Podfile.lock):
lottie-ios (= 2.5.2)
In Podfile:
flutter_lottie (from `.symlinks/plugins/flutter_lottie/ios`) was resolved to 0.0.1, which depends on
lottie-ios
It seems like you've changed the constraints of dependency `lottie-ios` inside your development pod `flutter_lottie`.
You should run `pod update lottie-ios` to apply changes you've made.
@q13945951476 首先确定你flutter packages get 成功了,本地都已经有所有包了,然后再执行,如果还有问题升级下你本地的 pod 命令版本,我刚刚试了clone一个新的执行没有问题
https://github.com/CarGuo/GSYGithubAppFlutter/issues/419
flutter packages get 提示 git 失败原因: 比如
win 是在 C:\Users\xxxxx\AppData\Roaming\Pub\Cache
路径下有 git
目录,如果存在某次 package get 失败之后,git
下目录会存在,然后出现这个异常。 可以删除 git 目录有重新 flutter packages get
mac 目录在~/.pub-cache
一般我们都是用 pub 上下第三方插件,但是有时候我们为了安全和私密,会选择使用 git 引用,而不引用官方pub上的包。 引用的时候可能会指定 ref 是 commit 的 hash 值或者分支如master,这时候如果在拉包的过程中出现问题,下次再拉包的时候,在 .pub_cache 内的 git 目录下会检测到已经存在目录,但是可能是空目录等等,导致 packages get 的时候异常。
所以你需要清除掉 .pub_cache 内的 git 的异常目录,然后最好清除掉项目目录下的 pubspec.lock ,之后重新 flutter packages get
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies. To update the CocoaPods specs, run: pod repo update
Error running pod install Error launching application on iPhone Xʀ.
按照这个报错,执行了命令,还是报这个
@flutePeak CocoaPods 1.6.1 版本
@CarGuo 1.7.2版本太高了吗? 我目前版本是1.7.2
@CarGuo 谢谢大大,我成功跑起来了,,我发现是我笔记本有缓存,之前老版本的一直影响着。。全删干净之后,1.7.2跑起来了
@CarGuo 我跑起来项目了,运行看着也没问题,但是时不时就进debug,说是报错了,有的地方为空,或者什么的。但是放行后,看着一切正常。。是我跑失败了,还是代码有问题?或者是我编辑器的锅,编辑器是VScode
项目运行起来了 界面展示如下:(启动展示的GSYGithubApp头像动画) 如何进入应用呢!
@algate 然后会进入登陆页,如果卡在这里说明没有运行成功,你下载打包好的apk就知道了
请求异常: DioError [DioErrorType.CONNECT_TIMEOUT]: Connecting timeout[15000ms]
@q815956089 Connecting timeout ,换个网络环境试试,15 秒超时
感谢回复,还是不行,报错
I/flutter (23539): base64Str login ODE1OTU2MDg5QHFxLmNvbTpzaWxlbmNlOTgyNjY0 I/flutter (23539): 请求url:https://api.github.com/authorizations I/flutter (23539): 请求头: {Authorization: Basic ODE1OTU2MDg5QHFxLmNvbTpzaWxlbmNlOTgyNjY0} I/flutter (23539): 请求参数: {"scopes":["user","repo","gist","notifications"],"note":"admin_script","client_id":"","client_secret":"
有人碰到这个问题吗,测试过其他项目可以获取到依赖包,这个项目获取报错了。。。 Working dir: E:\flutter_app\GSYGithubAppFlutter D:\app\flutter\bin\cache\dart-sdk\bin\pub.bat get 活动代码页: 936 Resolving dependencies... Cannot find a Git executable. Please ensure Git is correctly installed. Process finished with exit code 1
@yin87 log 上不是写着了么,没有找到 git 啊·····
@yin87 log 上不是写着了么,没有找到 git 啊·····
但是,不知道为什么会找不到。。。因为其他项目可以找到。。。百度了下也没找到解决方案。。。
@yin87 log 上不是写着了么,没有找到 git 啊·····
这是另外一个项目,正常。。。 Working dir: E:\flutter_app\flutter_trip-master D:\app\flutter\bin\cache\dart-sdk\bin\pub.bat get 活动代码页: 936 Resolving dependencies... Got dependencies! Process finished with exit code 0
其他项目不一定 pubspec.yaml 使用 git 依赖,而 GSY 使用了 git 依赖 @yin87 ,你可能 git 没有配置到环境变量中,直接在终端执行 git 命令看是不是没有配置
多谢耐心的回答,git有配置, C:\Users\10471>git --version git version 2.21.0.windows.1 下图显示出了版本号
@yin87 那就很诡异了,没遇到过这种情况
把下面代码注释了,packages get成功了
import 'package:gsy_github_app_flutter/common/config/ignoreConfig.dart'; 这一行报错 是因为没有获取到这个包吗?可是 flutter packages get没有报错啊
https://github.com/CarGuo/GSYGithubAppFlutter/issues/63 @tongyangsheng 看readme
@CarGuo 看到了!谢谢!博主在线频率好评 哈哈哈哈哈哈
DioError [DioErrorType.RESPONSE]: Http status error [401] {"message":"Requires authentication","documentation_url":"https://developer.github.com/v3"} 出现这个问题是什么原因? 已经按照@manburenshenglu注册了应用程序,输入了正确的ID和密码,但还是不行。
{"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"} 同样的错误
flutter 都1.9了,不考虑升级下吗
@houko 兼容的
DioError [DioErrorType.RESPONSE]:Http状态错误[401] {“消息”:“需要身份验证”,“ documentation_url”:“ https://developer.github.com/v3”} 出现这个问题是什么原因? 已经按照@manburenshenglu注册了应用程序,输入了正确的ID和密码,但还是不行。
@CarGuo
@chenxihub 如果是自己编译的,确定你申请的 github api 的 appId 是 sercet 是否正确。 然后确定使用 github 用户名 和 密码登陆,网络正常,暂时不支持开启了两次认证的账号。
@CarGuo 支持IOS吗?我试了一下ios编译出错
@houko 报错?我这边没报错呢,你的错误是什么,我的 pod 版本是 1.6.1
DioError [DioErrorType.RESPONSE]:Http状态错误[401] {“消息”:“需要身份验证”,“ documentation_url”:“ https://developer.github.com/v3”} 出现这个问题是什么原因? 已经按照@manburenshenglu注册了应用程序,输入了正确的ID和密码,但还是不行。
@CarGuo
@CarGuo 问题已经解决,原因有两个,一个是没有安装GitHub应用程序,另一个就是在flutter程序运行后出现的登录界面输入了错误的信息,正确的应该是在上面输入GitHub账户和密码
@CarGuo 你删我评论干啥啊 🐖
@houko 这个 pin issue 主要保留一些关键的回复,而且这是运行环境配置的issue
Flutter SDK 1.12.xx 版本目前请切换 dev_next 分支
flutter 环境配置,目前 兼容至 1.20
1、 sdk
git clone -b stable https://github.com/flutter/flutter.git
2、配置环境代理
win配置到环境变量
mac配置到 .bash_profile 文件(用户名目录下的隐藏文件,可以通过命令行 open .bash_profile 打包),新版的系统需要配置到 zsh 。
3、检查环境
重新打开命令行并执行
flutter doctor
4、同步项目的包
flutter packages get
5、androd和ios环境是否配置
目前
存在问题,详见: https://github.com/flutter/flutter/issues/20809