Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The method 'hashValues' isn't defined for the class #1326

Open
VIPIN24BOHRA opened this issue Sep 5, 2024 · 2 comments
Open

[BUG] The method 'hashValues' isn't defined for the class #1326

VIPIN24BOHRA opened this issue Sep 5, 2024 · 2 comments
Assignees
Labels
new issue New issue which has not been checked yet

Comments

@VIPIN24BOHRA
Copy link

History check
../lib/src/hls/hls_parser/drm_init_data.dart:22:23: Error: The method 'hashValues' isn't defined for the class 'DrmInitData'.

  • 'DrmInitData' is from 'package:better_player/src/hls/hls_parser/drm_init_data.dart' ('../lib/src/hls/hls_parser/drm_init_data.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
    int get hashCode => hashValues(schemeType, schemeData);
    ^^^^^^^^^^
    ../lib/src/hls/hls_parser/hls_track_metadata_entry.dart:31:23: Error: The method 'hashValues' isn't defined for the class 'HlsTrackMetadataEntry'.
  • 'HlsTrackMetadataEntry' is from 'package:better_player/src/hls/hls_parser/hls_track_metadata_entry.dart' ('../lib/src/hls/hls_parser/hls_track_metadata_entry.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
    int get hashCode => hashValues(groupId, name, variantInfos);
    ^^^^^^^^^^
    ../lib/src/hls/hls_parser/scheme_data.dart:52:23: Error: The method 'hashValues' isn't defined for the class 'SchemeData'.
  • 'SchemeData' is from 'package:better_player/src/hls/hls_parser/scheme_data.dart' ('../lib/src/hls/hls_parser/scheme_data.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
    int get hashCode => hashValues(
    ^^^^^^^^^^
    ../lib/src/hls/hls_parser/variant_info.dart:44:23: Error: The method 'hashValues' isn't defined for the class 'VariantInfo'.
  • 'VariantInfo' is from 'package:better_player/src/hls/hls_parser/variant_info.dart' ('../lib/src/hls/hls_parser/variant_info.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
    int get hashCode => hashValues(

Describe the bug
I have tried changing the version of gradel as well but the same problem arises each time, it says hashValues is not defined.

Flutter doctor
Please add flutter doctor output here.[√] Flutter (Channel main, 3.25.0-1.0.pre.251, on Microsoft Windows [Version 10.0.22631.4112], locale en-IN)
• Flutter version 3.25.0-1.0.pre.251 on channel main at C:\Users\vipin\OneDrive\Documents\flutterdev\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision dce20c97dd (20 hours ago), 2024-09-04 08:38:33 +0200
• Engine revision 14a8b542e0
• Dart version 3.6.0 (build 3.6.0-198.0.dev)
• DevTools version 2.39.0

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

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\vipin\AppData\Local\Android\sdk
• Platform android-35, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio2\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
• All Android licenses accepted.

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

[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.5.3)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
• Visual Studio Build Tools 2022 version 17.5.33516.290
• Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2024.1)
• Android Studio at C:\Program Files\Android\Android Studio2
• 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 17.0.11+0--11852314)

[√] VS Code (version 1.92.2)
• VS Code at C:\Users\vipin\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.96.0

[√] Connected device (4 available)
• M2007J20CI (mobile) • d7528bee • android-arm64 • Android 10 (API 29)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4112]
• Chrome (web) • chrome • web-javascript • Google Chrome 128.0.6613.119
• Edge (web) • edge • web-javascript • Microsoft Edge 128.0.2739.54

[√] Network resources
• All expected network resources are available.
Better Player version

  • Version: ^0.0.84

Smartphone (please complete the following information):

  • Device: Android
@VIPIN24BOHRA VIPIN24BOHRA added the new issue New issue which has not been checked yet label Sep 5, 2024
@VIPIN24BOHRA VIPIN24BOHRA changed the title [BUG] [BUG] The method 'hashValues' isn't defined for the class Sep 5, 2024
@ostue
Copy link

ostue commented Sep 22, 2024

I had the same problem when building my app for iOS. Seems like the hashValues function is deprecated in the newer flutter versions. If you need a quick work-around, just replace the hashCode-Implementation with your own.

More information regarding deprecated hashValues: https://api.flutter.dev/flutter/dart-ui/hashValues.html

@RichardRaue
Copy link

You are using Flutter v3.25. Try downgrading to v3.24.5 or earlier and update your flutter path in Android Studio and the PATH variable. Restart Android Studio and try a build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue New issue which has not been checked yet
Projects
None yet
Development

No branches or pull requests

4 participants