尝试查看 StreamChat 示例时出错

问题描述 投票:0回答:2

这是我在尝试运行流聊天颤振示例时遇到的颤振错误

所有依赖项均已完全更新,flutter 已完全更新

Get java version from JAVA_HOME: C:\Program Files\Android\Android Studio1\jbr
The photo_manager java version is 17
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/photo_manager-2.8.1/lib/src/internal/image_provider.dart:71:5: Error: Type 'DecoderCallback' not found.
    DecoderCallback decode, // ignore: deprecated_member_use
    ^^^^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/photo_manager-2.8.1/lib/src/internal/image_provider.dart:96:5: Error: Type 'DecoderCallback' not found.
    DecoderCallback decode, // ignore: deprecated_member_use
    ^^^^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/photo_manager-2.8.1/lib/src/internal/image_provider.dart:71:5: Error: 'DecoderCallback' isn't a type.
    DecoderCallback decode, // ignore: deprecated_member_use
    ^^^^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/photo_manager-2.8.1/lib/src/internal/image_provider.dart:96:5: Error: 'DecoderCallback' isn't a type.
    DecoderCallback decode, // ignore: deprecated_member_use
    ^^^^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/stream_chat_flutter-7.0.2/lib/src/bottom_sheets/stream_channel_info_bottom_sheet.dart:324:1: Error: Expected 0 type arguments.
PersistentBottomSheetController<T> showChannelInfoBottomSheet<T>({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/stream_chat_flutter-7.0.2/lib/src/bottom_sheets/stream_channel_info_bottom_sheet.dart:339:5: Error: Expected 0 type arguments.
    showBottomSheet<T>(
    ^
/C:/TPA%20Mobile%20App/flutter/packages/flutter/lib/src/material/bottom_sheet.dart:1327:33: Context: Found this candidate, but the arguments don't match.
PersistentBottomSheetController showBottomSheet({
                                ^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script 'C:\TPA Mobile App\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1419

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\TPA Mobile App\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
Error: Gradle task assembleDebug failed with exit code 1
flutter dart flutter-dependencies getstream-chat
2个回答
0
投票

试试这个:

复制此文件夹的内容:

C:\Program Files\Android\Android Studio\jbr

进入此文件夹:

C:\Program Files\Android\Android Studio\jre

你很好。


0
投票

当前的stream_chat_flutter与v3.19不兼容。你可以看看这个问题

你可以用他的fork,或者我在本地改了 >packages/stream_chat_flutter/lib/src/bottom_sheets/stream_channel_info_bottom_sheet.dart

PersistentBottomSheetController  showChannelInfoBottomSheet ({
  required BuildContext context,
  required Channel channel,
  Color? backgroundColor,
  double? elevation,
  BoxConstraints? constraints,
  AnimationController? transitionAnimationController,
  Clip? clipBehavior = Clip.hardEdge,
  ShapeBorder? shape = _kDefaultChannelInfoBottomSheetShape,
  void Function(Member)? onMemberTap,
  VoidCallback? onViewInfoTap,
  VoidCallback? onLeaveChannelTap,
  VoidCallback? onDeleteConversationTap,
  VoidCallback? onCancelTap,
}) =>
    showBottomSheet(
© www.soinside.com 2019 - 2024. All rights reserved.