TencentCloud / chat-demo-flutter

The sample app showcasing Tencent Cloud Chat integration with Flutter across iOS, Android, Web, macOS, and Windows platforms.
https://trtc.io/products/chat?utm_source=gfs&utm_medium=link&utm_campaign=%E6%B8%A0%E9%81%93&_channel_track_key=k6WgfCKn
Apache License 2.0
93 stars 38 forks source link

运行示例工程遇到了些问题 #5

Closed lexoops closed 1 year ago

lexoops commented 1 year ago

运行示例工程遇到了些问题 以下是我的doctor和log

------------------------------------------------flutter doctor--------------------------------------------------- ` E:\flutter\bin\flutter.bat doctor --verbose Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! [√] Flutter (Channel master, 3.9.0-7.0.pre.31, on Microsoft Windows [版本 10.0.22000.1696], locale zh-CN) • Flutter version 3.9.0-7.0.pre.31 on channel master at E:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision a599c08c32 (5 weeks ago), 2023-03-14 17:34:34 -0700 • Engine revision e80266b78e • Dart version 3.0.0 (build 3.0.0-322.0.dev) • DevTools version 2.22.2 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at C:\Users\TUF\AppData\Local\Android\sdk • Platform android-UpsideDownCake, build-tools 33.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619) • All Android licenses accepted.

[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.5) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.2.32616.157 • Windows 10 SDK version 10.0.17763.0 X The current Visual Studio installation is incomplete. Please reinstall Visual Studio.

[√] Android Studio (version 2022.1) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)

[√] IntelliJ IDEA Ultimate Edition (version 2018.3) • IntelliJ at E:\Program Files\IntelliJ IDEA 2018.3.6 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart

[√] IntelliJ IDEA Ultimate Edition (version 2021.3) • IntelliJ at E:\Program Files\JetBrains\IntelliJ IDEA 2021.3.3 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart

[√] Connected device (4 available) • SM G988N (mobile) • 127.0.0.1:62001 • android-x86 • Android 7.1.2 (API 25) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.22000.1696] • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.148 • Edge (web) • edge • web-javascript • Microsoft Edge 112.0.1722.39

[!] Network resources X An HTTP error occurred while checking "https://github.com/": 信号灯超时时间已到

! Doctor found issues in 2 categories. Process finished with exit code 0 `

-------------------------LOG------------------------------------------------- `Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Resolving dependencies...

class ExtendedTextSelectionState extends State ^^^^^^^^^^^^^^^^^^^^^^^^^^ /E:/flutter/packages/flutter/lib/src/services/text_input.dart:1117:8: Context: 'TextInputClient.insertContent' is defined here. void insertContent(KeyboardInsertedContent content) {} ^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_extended_text_field-1.0.1+2/lib/src/extended_editable_text.dart:1224:7: Error: The non-abstract class 'ExtendedEditableTextState' is missing implementations for these members:

class ExtendedEditableTextState extends State ^^^^^^^^^^^^^^^^^^^^^^^^^ /E:/flutter/packages/flutter/lib/src/services/text_input.dart:1117:8: Context: 'TextInputClient.insertContent' is defined here. void insertContent(KeyboardInsertedContent content) {} ^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' doesn't have the named parameter 'devicePixelRatio' of overridden method 'ViewportOffset with ScrollMetrics.copyWith'. PageMetrics copyWith({ ^ /E:/flutter/packages/flutter/lib/src/widgets/scroll_position.dart:92:16: Context: This is the overridden method ('copyWith'). abstract class ScrollPosition extends ViewportOffset with ScrollMetrics { ^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' has fewer named arguments than those of overridden method 'PageMetrics.copyWith'. PageMetrics copyWith({ ^ /E:/flutter/packages/flutter/lib/src/widgets/page_view.dart:277:15: Context: This is the overridden method ('copyWith'). PageMetrics copyWith({ ^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' doesn't have the named parameter 'devicePixelRatio' of overridden method 'PageMetrics.copyWith'. PageMetrics copyWith({ ^ /E:/flutter/packages/flutter/lib/src/widgets/page_view.dart:277:15: Context: This is the overridden method ('copyWith'). PageMetrics copyWith({ ^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_cloud_chat_uikit-2.0.0-preview.6/lib/ui/views/TIMUIKitChat/TIMUIKitAppBar/tim_uikit_appbar.dart:199:7: Error: No named parameter with the name 'textTheme'. textTheme: setAppbar?.textTheme, ^^^^^^^^^ /E:/flutter/packages/flutter/lib/src/material/app_bar.dart:177:3: Context: Found this candidate, but the arguments don't match. AppBar({ ^^^^^^ lib/src/chat.dart:632:33: Error: No named parameter with the name 'textTheme'. textTheme: TextTheme( ^^^^^^^^^ /E:/flutter/packages/flutter/lib/src/material/app_bar.dart:177:3: Context: Found this candidate, but the arguments don't match. AppBar({ ^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_wechat_camera_picker-3.6.5+2/lib/src/states/camera_picker_state.dart:170:20: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'. SystemChrome.setEnabledSystemUIOverlays([]); ^^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_wechat_camera_picker-3.6.5+2/lib/src/states/camera_picker_state.dart:179:20: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'. SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); ^^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/gesture_page_view.dart:21:49: Error: Required named parameter 'devicePixelRatio' must be provided. final PageMetrics _testPageMetrics = PageMetrics( ^ /E:/flutter/packages/flutter/lib/src/widgets/page_view.dart:266:3: Context: Found this candidate, but the arguments don't match. PageMetrics({ ^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_extended_text_library-1.0.0/lib/src/selection/extended_text_selection.dart:364:18: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.

FAILURE: Build failed with an exception.

BUILD FAILED in 14s Exception: Gradle task assembleDebug failed with exit code 1 `

hexingcheng commented 1 year ago

flutter 3.7以上可以这样修改后运行 https://github.com/TencentCloud/chat-demo-flutter/blob/main/pubspec.yaml#L20,参考这个注释

lexoops commented 1 year ago

image

改了之后成了这样,请问这怎么破呢? Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Launching lib\main.dart on SM G988N in debug mode... Running Gradle task 'assembleDebug'... Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/gesture_page_view.dart:21:49: Error: Required named parameter 'devicePixelRatio' must be provided. final PageMetrics _testPageMetrics = PageMetrics( ^ /E:/flutter/packages/flutter/lib/src/widgets/page_view.dart:266:3: Context: Found this candidate, but the arguments don't match. PageMetrics({ ^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' doesn't have the named parameter 'devicePixelRatio' of overridden method 'ViewportOffset with ScrollMetrics.copyWith'. PageMetrics copyWith({ ^ /E:/flutter/packages/flutter/lib/src/widgets/scroll_position.dart:92:16: Context: This is the overridden method ('copyWith'). abstract class ScrollPosition extends ViewportOffset with ScrollMetrics { ^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' has fewer named arguments than those of overridden method 'PageMetrics.copyWith'. PageMetrics copyWith({ ^ /E:/flutter/packages/flutter/lib/src/widgets/page_view.dart:277:15: Context: This is the overridden method ('copyWith'). PageMetrics copyWith({ ^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:213:15: Error: The method 'ExtendedPagePosition.copyWith' doesn't have the named parameter 'devicePixelRatio' of overridden method 'PageMetrics.copyWith'. PageMetrics copyWith({ ^ /E:/flutter/packages/flutter/lib/src/widgets/page_view.dart:277:15: Context: This is the overridden method ('copyWith'). PageMetrics copyWith({ ^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture/page_view/widgets/scroll_position.dart:221:23: Error: Required named parameter 'devicePixelRatio' must be provided. return PageMetrics( ^ /E:/flutter/packages/flutter/lib/src/widgets/page_view.dart:266:3: Context: Found this candidate, but the arguments don't match. PageMetrics({ ^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/extended_image-6.4.1/lib/src/gesture_detector/drag.dart:145:3: Error: The superclass, 'OneSequenceGestureRecognizer with DragGestureRecognizerMixin', has no unnamed constructor that takes no arguments. ExtendedDragGestureRecognizer({ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_extended_text_library-1.0.0/lib/src/selection/extended_text_selection.dart:364:18: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.

class ExtendedEditableTextState extends State ^^^^^^^^^^^^^^^^^^^^^^^^^ /E:/flutter/packages/flutter/lib/src/services/text_input.dart:1117:8: Context: 'TextInputClient.insertContent' is defined here. void insertContent(KeyboardInsertedContent content) {} ^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_extended_text_field-1.0.1+2/lib/src/extended_render_editable.dart:82:40: Error: Type 'BidirectionalIterator' not found. class VerticalCaretMovementRun extends BidirectionalIterator { ^^^^^^^^^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_extended_text-1.0.2+1/lib/src/selection/extended_text_selection.dart:150:7: Error: The non-abstract class 'ExtendedTextSelectionState' is missing implementations for these members:

class ExtendedTextSelectionState extends State ^^^^^^^^^^^^^^^^^^^^^^^^^^ /E:/flutter/packages/flutter/lib/src/services/text_input.dart:1117:8: Context: 'TextInputClient.insertContent' is defined here. void insertContent(KeyboardInsertedContent content) {} ^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_cloud_chat_uikit-2.0.0-preview.6/lib/ui/views/TIMUIKitChat/TIMUIKitAppBar/tim_uikit_appbar.dart:199:7: Error: No named parameter with the name 'textTheme'. textTheme: setAppbar?.textTheme, ^^^^^^^^^ /E:/flutter/packages/flutter/lib/src/material/app_bar.dart:177:3: Context: Found this candidate, but the arguments don't match. AppBar({ ^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_wechat_camera_picker-3.6.5+2/lib/src/states/camera_picker_state.dart:170:20: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'. SystemChrome.setEnabledSystemUIOverlays([]); ^^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/Users/TUF/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/tencent_wechat_camera_picker-3.6.5+2/lib/src/states/camera_picker_state.dart:179:20: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'. SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); ^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/src/chat.dart:632:33: Error: No named parameter with the name 'textTheme'. textTheme: TextTheme( ^^^^^^^^^ /E:/flutter/packages/flutter/lib/src/material/app_bar.dart:177:3: Context: Found this candidate, but the arguments don't match. AppBar({ ^^^^^^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

BUILD FAILED in 5s Exception: Gradle task assembleDebug failed with exit code 1

hexingcheng commented 1 year ago

将flutter版本切换到最新的stable版本吧,不建议用master

lexoops commented 1 year ago

将flutter版本切换到最新的stable版本吧,不建议用master

我切换到3.6的版本以后,能正常运行了,感谢