flutter中使用socket导致UI卡顿?
  1. 在flutter使用tcp请求服务器的时候,在listen中对tcp流进行解析,解析过程包含拆包和拼包,正常情况下都没有问题,但是当服务器推送的流过快的时候,导致UI卡死,有人有好的建议吗?
  2. 代码如下: Future<Socket> _connect(String ip, int port) async{ if(!isConnect()) { try { _socket = await Socket.connect(ip, port, timeout: Duration(seconds: 20),); _socket.listen(_onData, onError: _onError, onDone: _onDone); }catch(e){ if(e is SocketException){ _onTimeout(); }else{ print("error : $e"); } } } return _socket; } _onData中是一些拼包拆包的业务逻辑,当tcp流包含多个业务报文的时候,onData中会循环拆分包直至拆分完成,每个包都会回调到具体的业务逻辑。。现在问题是,如果服务器发送的是base64图片的话,系统就会卡死,请问 下这个问题怎么解决?

3个回答

问题解决了,我发现在release模式下才会卡顿,在debug模式下不会卡顿。
因为服务器那边会通过tcp一直推送图片,然后每个tcp报文在release模式下大概为1800000个长度的List,而debug模式下每个报文为500000的List长度,图片大概是150000的长度,因此,每次要对报文进行拆包操作
,用到List.sbulist和addall这两个api,如果报文太大的话,这两个会耗时较长,导致下一个包没有及时收取,会导致卡顿。。
我的解法是,对每个数据list进行拆分处理,拆分成static const int SOCKET_LENGTH = 1024 * 256这么长的小段,然后对小段进行拆包拼包处理。
总结就是sublist 和 addall在list长度较长的时候效率极低,我的优化是不直接处理原始包,先把原始包拆分为中包,然后在依次拼接这些中包来读取图片数据。

没有遇到你说的问题,你的代码写的有问题吧?

肯定是你的代码问题,至少自己写的代码没有for循环,也没有用到你说的两个函数,详见Uint8List

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python+OpenCV计算机视觉

Python+OpenCV计算机视觉

flutter中如何设计成如下的UI布局

![UI布局](https://img-ask.csdn.net/upload/202004/17/1587094453_403660.jpg) flutter中如何实现如图所示的UI设计

flutter开发UI怎么监听焦点改变事件

Android开发UI,监听焦点变化,我们可以使用setOnFocusChangeListener,flutter里面怎么处理焦点事件?

Listview嵌套Gridview加载数据太多会很卡

![图片说明](https://img-ask.csdn.net/upload/201507/11/1436611717_915530.png)求问有没有类似的空间可以代替Listview嵌套Gridview,十分感谢

Flutter 初学使用过程中 使用flutter run后报错 Gradle task assembleDebug failed with exit code 1

使用flutter run后报错Gradle task assembleDebug failed with exit code 1 只做了签名 + 应用图标修改、其余在未修改做了签名 + 应用图标修改前都是正常 尝试退回做了签名 + 应用图标的修改后依然还是一样 ![图片说明](https://img-ask.csdn.net/upload/201907/15/1563141156_887986.png)

求一个Flutter调用aar的案例

老板给了一个需求,需要做一个app,无奈没有android基础,所以想用Flutter写,需要调用第三方sdk,望厉害的大佬写个案例参考参考,。

flutter 软键盘切换问题

flutter 在使用百度键盘的时候,TextField 设置了 keyboardType 但是没用, 在多个TextField切换的时候,软键盘的类型并不是及时的,有时候需要先关闭软键盘,再点击获取焦点才能显示正确的键盘类型。 测试了百度输入法,搜狗输入法,讯飞输入法。 百度输入法不能及时变更键盘类型,搜狗和讯飞可以。 求flutter的大佬告诉我这是为啥。咋弄~ ![图片说明](https://img-ask.csdn.net/upload/202004/10/1586509209_316095.gif)

安装flutter,运行flutter_console.bat时提示错误。

1.从官网下载flutter_windows_v1.0.0-stable.zip,然后将其解压到D:\flutter。 2.运行flutter_console.bat 提示MySQL的错误![图片说明](https://img-ask.csdn.net/upload/201812/15/1544883640_383021.png) 不知道这是什么原因? 我本地有mysql,设置了环境变量,也能登录mysql,就是在flutter console控制台报这个mysql的错误。如图: ![图片说明](https://img-ask.csdn.net/upload/201812/15/1544883964_477085.png) 然后我继续执行,flutter doctor, ![图片说明](https://img-ask.csdn.net/upload/201812/15/1544885595_295969.png) 然后我打开Android Studio 创建flutter项目,项目创建完之后也提示mysql的错误,并不能进入项目,如图 ![图片说明](https://img-ask.csdn.net/upload/201812/15/1544885356_248737.png) 因为有这个错误导致无法成功创建flutter项目 flutter_console.bat文件的内容是: ![图片说明](https://img-ask.csdn.net/upload/201812/18/1545140762_896457.png) 看bat文件也并没有用到mysql的内容

android开发中是否可以用flutter来专门制作界面交互然后用android原生java响应事件实现功能?

就是在android studio中,不再使用原生的XML布局来写界面,而是用flutter来做界面、做页面跳转等交互。然后java类文件是否可以响应flutter的一些控件事件,并把通信结果返回给flutter? <br> **总的来说就是是否可以用flutter替代android原生XML布局,flutter管界面和交互,android原生sdk管功能实现,并能互相通信?** <br> **我要怎么做?**

flutter中扫描WiFi的问题,为什么用wifi_configuration.dart的package去扫描会出现get到的值为空?请问是什么情况?

flutter: import 'package:wifi_configuration/wifi_configuration.dart'; 调用这个package去扫描WiFi,扫描到的结果为空, void getConnectionState() async { var listAvailableWifi = await WifiConfiguration.getWifiList(); var listWifi = listAvailableWifi.toString(); print("get wifi list : " + listAvailableWifi.toString()); print(listWifi.contains("Nebula")); print(listAvailableWifi.length); } 结果如下 I/flutter (20369): get wifi list : [] I/flutter (20369): false I/flutter (20369): 0 I/flutter (20369): 请问是什么情况

flutter Navigator路由跳转和返回,组件会重复build

https://github.com/flutter/flutter/issues/11655 为什么页面1, push到页面2,页面1会触发build?,然后回来的时候又build了一次 这样的话,我一个listView滚了很多了,结果点到详情页又得重新滚,这到底是bug还是故意为之的

flutter的demo跑不起来

![图片说明](https://img-ask.csdn.net/upload/201902/01/1549015563_655607.png) flutter_android里的android文件夹是可以通过android studio编译通过的,但是直接运行flutter_android就报以下错误 ![图片说明](https://img-ask.csdn.net/upload/201902/01/1549015797_773062.png) 尝试过在android文件夹所对应的项目中增加 ``` // maven { url 'https://maven.aliyun.com/repository/google' } // maven { url 'https://maven.aliyun.com/repository/jcenter' } // maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } ``` 在flutter里的flutter.gradler中也增加上面的代码片段。但是也是报上文的错误。 ![图片说明](https://img-ask.csdn.net/upload/201902/01/1549016080_832953.png)

项目加入消息推送功能,我打算用socket io实现,但遇到了问题

private Socket mSocket; { try { mSocket = IO.socket(Constants.CHAT_SERVER_URL); } catch (URISyntaxException e) { throw new RuntimeException(e); } } public Socket getSocket() { return mSocket; } import io.socket.client.IO; import io.socket.client.Socket; 例子中导了这两个包,但就是找不到这两个包,上网上也没搜到。 有没有人知道该怎么做啊。

Flutter ios原生开发添加广点通开屏广告,进入flutter后无法加载插件?

想要给项目添加开屏广告,但是没有广点通的相关插件,所以只能从原生那里入手。 想法是在进入flutter界面前,添加一个开屏,开屏结束后进入flutter 根据 https://github.com/gdtmobsdk/GDTMobSDK 配置好sdk后 仿照 https://github.com/gdtmobsdk/GDTMobSDK/blob/v4.11.1/GDTMobSample-Swift/AppDelegate.swift 写了自己的AppDelegate.swift 如下 出现的问题是,能够正常显示开屏广告,显示完毕后也能进入flutter,但是flutter所有的第三方插件全部失效,报错是没有找到插件。 AppDelegate.swift ``` import UIKit import Flutter @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { var splash: GDTSplashAd! var flutterViewController: FlutterViewController? var flutterEngine : FlutterEngine?; override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) self.flutterViewController = FlutterViewController() window = UIWindow.init(frame: UIScreen.main.bounds) let rootViewController = GDTNavigationController.init(rootViewController: self.flutterViewController!) rootViewController.navigationBar.isHidden = true rootViewController.navigationBar.isTranslucent = true window?.rootViewController = rootViewController window.makeKeyAndVisible() if UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.phone { splash = GDTSplashAd.init(appId: Constant.appID, placementId: Constant.placementID) splash.delegate = self as? GDTSplashAdDelegate var splashImage = UIImage(named: "SplashNormal-swift") if Util.isIphoneX() { splashImage = UIImage(named: "SplashX-swift") } else if Util.isSmallIphone() { splashImage = UIImage(named: "SplashSmall-swift") } splash.backgroundImage = splashImage splash.fetchDelay = 3 splash.loadAndShow(in: window) } return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } ``` 为了方便查看贴上图片代码: ![图片说明](https://img-ask.csdn.net/upload/201912/16/1576501326_484314.png) p.s flutter正常生成的代码(未改造前的): ``` import UIKit import Flutter @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } ```

Flutter开发应用时,怎么连接本地服务器?

我使用Apche来构建本地服务器,但是不知道如何使用Flutter或者dart库来连接本地的服务器。

flutter项目无法引入qr_flutter包,packages get时候报错,望各位大佬指点迷津!

Package qr_flutter has no versions that match >=1.1.3 <2.0.0 derived from: - zhihu depends on version ^1.1.3 ---- Log transcript ---- FINE: Pub 2.0.0-dev.16.0 IO : Spawning "cmd /c ver" in F:\ECAVC\zhihu-flutter-master\zhihu-flutter-master\. IO : Finished ver. Exit code 0. | stdout: | | | | Microsoft Windows [Version 6.1.7601] | Nothing output on stderr. MSG : Resolving dependencies... SLVR: Solving dependencies: | - cupertino_icons ^0.1.0 from hosted (cupertino_icons) (locked to 0.1.1) | - flutter any from sdk (flutter) (locked to 0.0.0) IO : Get versions from https://pub.flutter-io.cn/api/packages/qr_flutter. IO : HTTP GET https://pub.flutter-io.cn/api/packages/qr_flutter | Accept: application/vnd.pub.v2+json | user-agent: Dart pub 2.0.0-dev.16.0 IO : HTTP response 200 OK for GET https://pub.flutter-io.cn/api/packages/qr_flutter | took 0:00:01.060953 | connection: keep-alive | transfer-encoding: chunked | date: Fri, 28 Sep 2018 13:45:12 GMT | content-encoding: gzip | vary: Accept-Encoding | x-m-reqid: qWoAAP8YGXNIlFgV | content-type: application/json | x-xss-protection: 1; mode=block | x-source: C/200 | x-m-log: QNM:xs462;SRCPROXY:xs481;SRC:254;SRCPROXY:255;QNM3:553 | server: marco/2.6 | x-request-id: e6d1190402c12d9729c11b58b7ab7625 | via: S.mix-gd-can-007, T.10.D, V.mix-gd-can-007, T.3.D, M.cun-hn-csx-005 | x-frame-options: SAMEORIGIN | x-content-type-options: nosniff | x-qnm-cache: Validate,MissValidate SLVR: * start at root SLVR: | cupertino_icons 0.1.1 from hosted is locked SLVR: | * select cupertino_icons 0.1.1 from hosted SLVR: | | english_words 3.1.3 from hosted is locked SLVR: | | * select english_words 3.1.3 from hosted SLVR: | | | flutter 0.0.0 from sdk is locked SLVR: | | | * select flutter 0.0.0 from sdk SLVR: | | | | collection 1.14.5 from hosted is locked SLVR: | | | | * select collection 1.14.5 from hosted SLVR: | | | | | flutter_test 0.0.0 from sdk is locked SLVR: | | | | | * select flutter_test 0.0.0 from sdk SLVR: | | | | | | * select pub itself SLVR: | | | | | | | args 1.2.0 from hosted is locked SLVR: | | | | | | | * select args 1.2.0 from hosted SLVR: | | | | | | | | async 2.0.3 from hosted is locked SLVR: | | | | | | | | * select async 2.0.3 from hosted SLVR: | | | | | | | | | barback 0.15.2+14 from hosted is locked SLVR: | | | | | | | | | * select barback 0.15.2+14 from hosted SLVR: | | | | | | | | | | boolean_selector 1.0.2 from hosted is locked SLVR: | | | | | | | | | | * select boolean_selector 1.0.2 from hosted SLVR: | | | | | | | | | | | charcode 1.1.1 from hosted is locked SLVR: | | | | | | | | | | | * select charcode 1.1.1 from hosted SLVR: | | | | | | | | | | | | cli_util 0.1.2+1 from hosted is locked SLVR: | | | | | | | | | | | | * select cli_util 0.1.2+1 from hosted SLVR: | | | | | | | | | | | | | convert 2.0.1 from hosted is locked SLVR: | | | | | | | | | | | | | * select convert 2.0.1 from hosted SLVR: | | | | | | | | | | | | | | crypto 2.0.2+1 from hosted is locked SLVR: | | | | | | | | | | | | | | * select crypto 2.0.2+1 from hosted SLVR: | | | | | | | | | | | | | | | csslib 0.14.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | * select csslib 0.14.1 from hosted SLVR: | | | | | | | | | | | | | | | | glob 1.1.5 from hosted is locked SLVR: | | | | | | | | | | | | | | | | * select glob 1.1.5 from hosted SLVR: | | | | | | | | | | | | | | | | | html 0.13.2+2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | * select html 0.13.2+2 from hosted SLVR: | | | | | | | | | | | | | | | | | | http 0.11.3+16 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | * select http 0.11.3+16 from hosted SLVR: | | | | | | | | | | | | | | | | | | | http_multi_server 2.0.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | * select http_multi_server 2.0.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | http_parser 3.1.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | * select http_parser 3.1.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | io 0.3.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | * select io 0.3.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | isolate 1.1.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | * select isolate 1.1.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | js 0.6.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | * select js 0.6.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | logging 0.11.3+1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | * select logging 0.11.3+1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | matcher 0.12.1+4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | * select matcher 0.12.1+4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | meta 1.1.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | * select meta 1.1.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | mime 0.9.5 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | * select mime 0.9.5 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | mockito 2.2.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select mockito 2.2.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multi_server_socket 1.0.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select multi_server_socket 1.0.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | node_preamble 1.4.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select node_preamble 1.4.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | package_config 1.0.3 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select package_config 1.0.3 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | package_resolver 1.0.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select package_resolver 1.0.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | path 1.5.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select path 1.5.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin 0.2.0+2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select plugin 0.2.0+2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pool 1.3.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select pool 1.3.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pub_semver 1.3.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select pub_semver 1.3.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | quiver 0.28.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select quiver 0.28.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shelf 0.7.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select shelf 0.7.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shelf_packages_handler 1.0.3 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select shelf_packages_handler 1.0.3 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shelf_static 0.2.7 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select shelf_static 0.2.7 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shelf_web_socket 0.2.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select shelf_web_socket 0.2.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sky_engine 0.0.99 from path is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select sky_engine 0.0.99 from path SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source_map_stack_trace 1.1.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select source_map_stack_trace 1.1.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source_maps 0.10.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select source_maps 0.10.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source_span 1.4.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select source_span 1.4.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stack_trace 1.9.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select stack_trace 1.9.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stream_channel 1.6.3 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select stream_channel 1.6.3 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | string_scanner 1.0.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select string_scanner 1.0.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | term_glyph 1.0.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select term_glyph 1.0.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test 0.12.30+1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select test 0.12.30+1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | analyzer 0.31.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select analyzer 0.31.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | front_end 0.1.0-alpha.9 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select front_end 0.1.0-alpha.9 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel 0.3.0-alpha.9 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select kernel 0.3.0-alpha.9 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typed_data 1.1.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select typed_data 1.1.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | utf 0.9.0+3 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select utf 0.9.0+3 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vector_math 2.0.5 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select vector_math 2.0.5 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | watcher 0.9.7+6 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select watcher 0.9.7+6 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | web_socket_channel 1.0.6 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select web_socket_channel 1.0.6 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yaml 2.1.13 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select yaml 2.1.13 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 1.1.2 of qr_flutter doesn't match >=1.1.3 <2.0.0: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zhihu 0.0.0 (root) -> qr_flutter ^1.1.3 from hosted (qr_flutter) SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 1.1.1 of qr_flutter doesn't match >=1.1.3 <2.0.0: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zhihu 0.0.0 (root) -> qr_flutter ^1.1.3 from hosted (qr_flutter) SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 1.1.0 of qr_flutter doesn't match >=1.1.3 <2.0.0: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zhihu 0.0.0 (root) -> qr_flutter ^1.1.3 from hosted (qr_flutter) SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 1.0.0 of qr_flutter doesn't match >=1.1.3 <2.0.0: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zhihu 0.0.0 (root) -> qr_flutter ^1.1.3 from hosted (qr_flutter) SLVR: BacktrackingSolver took 0:00:01.494368 seconds. | - Tried 1 solutions | - Requested 1 version lists | - Looked up 1 cached version lists | FINE: Resolving dependencies finished (1.5s). ERR : Package qr_flutter has no versions that match >=1.1.3 <2.0.0 derived from: | - zhihu depends on version ^1.1.3 FINE: Exception type: NoVersionException FINE: package:pub/src/entrypoint.dart 216 Entrypoint.acquireDependencies | package:pub/src/command/get.dart 38 GetCommand.run | package:args/command_runner.dart 194 CommandRunner.runCommand | package:pub/src/command_runner.dart 167 PubCommandRunner.runCommand.<fn> | dart:async new Future.sync | package:pub/src/utils.dart 103 captureErrors.<fn> | package:stack_trace Chain.capture | package:pub/src/utils.dart 118 captureErrors | package:pub/src/command_runner.dart 167 PubCommandRunner.runCommand | package:pub/src/command_runner.dart 116 PubCommandRunner.run | E:\b\build\slave\dart-sdk-windows-dev\build\sdk\third_party\pkg\pub\bin\pub.dart 8 main | ===== asynchronous gap =========================== | dart:async _Completer.completeError | package:pub/src/entrypoint.dart Entrypoint.acquireDependencies | ===== asynchronous gap =========================== | dart:async _asyncThenWrapperHelper | package:pub/src/entrypoint.dart 194 Entrypoint.acquireDependencies | package:pub/src/command/get.dart 38 GetCommand.run | package:args/command_runner.dart 194 CommandRunner.runCommand | ===== asynchronous gap =========================== | dart:async new Future.microtask | package:args/command_runner.dart 142 CommandRunner.runCommand | package:pub/src/command_runner.dart 167 PubCommandRunner.runCommand.<fn> | dart:async new Future.sync | package:pub/src/utils.dart 103 captureErrors.<fn> | package:stack_trace Chain.capture | package:pub/src/utils.dart 118 captureErrors | package:pub/src/command_runner.dart 167 PubCommandRunner.runCommand ---- End log transcript ---- pub get failed (1) ``` ```

flutter绘制页面时,闪退[ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.IllegalArgumentException: array == null

自动化测试过程中,发现进入APP拍摄页会出现引导弹窗,就会闪退,抓取log如下,希望有大神解决,找研发了,他们也没有办法 ``` 06-12 15:55:42.870 E/flutter ( 2064): [ERROR:flutter/flow/layers/transform_layer.cc(22)] TransformLayer is constructed with an invalid matrix. 06-12 15:55:42.870 I/chatty ( 2064): uid=10266(com.ghj.tongue) 3.ui identical 1 line 06-12 15:55:42.870 E/flutter ( 2064): [ERROR:flutter/flow/layers/transform_layer.cc(22)] TransformLayer is constructed with an invalid matrix. 06-12 15:55:42.909 I/flutter ( 2064): kang-----CameraHintDialog:宽度_60.0 高度_60.0 06-12 15:55:42.936 E/flutter ( 2064): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.IllegalArgumentException: array == null 06-12 15:55:42.936 E/flutter ( 2064): at android.opengl.Matrix.multiplyMM(Native Method) 06-12 15:55:42.936 E/flutter ( 2064): at io.flutter.view.AccessibilityBridge$SemanticsNode.updateRecursively(AccessibilityBridge.java:2146) 06-12 15:55:42.936 E/flutter ( 2064): at io.flutter.view.AccessibilityBridge$SemanticsNode.updateRecursively(AccessibilityBridge.java:2194) 06-12 15:55:42.936 E/flutter ( 2064): at io.flutter.view.AccessibilityBridge$SemanticsNode.access$4300(AccessibilityBridge.java:1779) 06-12 15:55:42.936 E/flutter ( 2064): at io.flutter.view.AccessibilityBridge.updateSemantics(AccessibilityBridge.java:1289) 06-12 15:55:42.936 E/flutter ( 2064): at io.flutter.view.AccessibilityBridge$1.updateSemantics(AccessibilityBridge.java:266) 06-12 15:55:42.936 E/flutter ( 2064): at io.flutter.embedding.engine.FlutterJNI.updateSemantics(FlutterJNI.java:428) 06-12 15:55:42.936 E/flutter ( 2064): at android.os.MessageQueue.nativePollOnce(Native Method) 06-12 15:55:42.936 E/flutter ( 2064): at android.os.MessageQueue.next(MessageQueue.java:330) 06-12 15:55:42.936 E/flutter ( 2064): at android.os.Looper.loop(Looper.java:169) 06-12 15:55:42.936 E/flutter ( 2064): at android.app.ActivityThread.main(ActivityThread.java:7053) 06-12 15:55:42.936 E/flutter ( 2064): at java.lang.reflect.Method.invoke(Native Method) 06-12 15:55:42.936 E/flutter ( 2064): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536) 06-12 15:55:42.936 E/flutter ( 2064): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876) 06-12 15:55:42.936 E/flutter ( 2064): 06-12 15:55:42.936 F/flutter ( 2064): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(95)] Check failed: CheckException(env). ```

flutter连接不上虚拟设备,真机也连接不上,flutter检测全部正常,只有设备检测不到

flutter连接不上虚拟设备,真机也连接不上,flutter检测全部正常,只有设备检测不到。打开创建的虚拟设备,执行flutter doctor也是显示的无设备,愁死了。 有偿解决!有偿! ![图片说明](https://img-ask.csdn.net/upload/202005/06/1588751644_733707.png)

vs code编译flutter,Initializing gradle后报错

小白一枚,还请大神指教 因为之前一直卡在Initializing gradle步骤,然后查了CSDN修改了一次flutter.gradle文件之后,就一直报错,改回来也没用。没改之间就一直卡在Initializing gradle。 报错的代码: Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:219) at java.util.zip.ZipFile.<init>(ZipFile.java:149) at java.util.zip.ZipFile.<init>(ZipFile.java:163) at org.gradle.wrapper.Install.unzip(Install.java:214) at org.gradle.wrapper.Install.access$600(Install.java:27) at org.gradle.wrapper.Install$1.call(Install.java:74) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Command: /Users/jackwang/Documents/Flutter/first_flutter_app/android/gradlew -v Exited (sigterm) 还请大佬指教!

android studio下运行flutter提示连接不上android设备

在android studio里开发flutter项目,flutter和dart插件都安装了,各种配置环境都配好了,但是运行项目还是提示没有可连接的设备,运行android studio项目就可以运行,但是运行flutter项目就连不上设备 ![图片说明](https://img-ask.csdn.net/upload/201912/18/1576647083_176276.jpg) 输入flutter doctor显示如图 ![图片说明](https://img-ask.csdn.net/upload/201912/20/1576809036_857979.jpg)

2019 Python开发者日-培训

2019 Python开发者日-培训

150讲轻松搞定Python网络爬虫

150讲轻松搞定Python网络爬虫

设计模式(JAVA语言实现)--20种设计模式附带源码

设计模式(JAVA语言实现)--20种设计模式附带源码

YOLOv3目标检测实战:训练自己的数据集

YOLOv3目标检测实战:训练自己的数据集

java后台+微信小程序 实现完整的点餐系统

java后台+微信小程序 实现完整的点餐系统

三个项目玩转深度学习(附1G源码)

三个项目玩转深度学习(附1G源码)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

2019 AI开发者大会

2019 AI开发者大会

玩转Linux:常用命令实例指南

玩转Linux:常用命令实例指南

一学即懂的计算机视觉(第一季)

一学即懂的计算机视觉(第一季)

4小时玩转微信小程序——基础入门与微信支付实战

4小时玩转微信小程序——基础入门与微信支付实战

Git 实用技巧

Git 实用技巧

Python数据清洗实战入门

Python数据清洗实战入门

使用TensorFlow+keras快速构建图像分类模型

使用TensorFlow+keras快速构建图像分类模型

实用主义学Python(小白也容易上手的Python实用案例)

实用主义学Python(小白也容易上手的Python实用案例)

程序员的算法通关课:知己知彼(第一季)

程序员的算法通关课:知己知彼(第一季)

MySQL数据库从入门到实战应用

MySQL数据库从入门到实战应用

机器学习初学者必会的案例精讲

机器学习初学者必会的案例精讲

手把手实现Java图书管理系统(附源码)

手把手实现Java图书管理系统(附源码)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

.net core快速开发框架

.net core快速开发框架

玩转Python-Python3基础入门

玩转Python-Python3基础入门

Python数据挖掘简易入门

Python数据挖掘简易入门

微信公众平台开发入门

微信公众平台开发入门

程序员的兼职技能课

程序员的兼职技能课

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

HoloLens2开发入门教程

HoloLens2开发入门教程

微信小程序开发实战

微信小程序开发实战

Java8零基础入门视频教程

Java8零基础入门视频教程

相关热词 c# 解析cad c#数字格式化万 c#int转byte c#格式化日期 c# wpf 表格 c# 实现ad域验证登录 c#心跳包机制 c#使用fmod.dll c#dll vb 调用 c# outlook
立即提问
相关内容推荐