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

error: cannot find symbol #257

Open
cnkygmr opened this issue Feb 13, 2025 · 4 comments
Open

error: cannot find symbol #257

cnkygmr opened this issue Feb 13, 2025 · 4 comments

Comments

@cnkygmr
Copy link

cnkygmr commented Feb 13, 2025

ffmpeg_kit_flutter discontinued maybe you need ffmpeg_kit_flutter_full

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ffmpeg_kit_flutter:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler output below.
  warning: [options] source value 8 is obsolete and will be removed in a future release
  warning: [options] target value 8 is obsolete and will be removed in a future release
  warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
  /Users/xxx/.pub-cache/hosted/pub.dev/ffmpeg_kit_flutter-6.0.3/android/src/main/java/com/arthenica/ffmpegkit/flutter/FFmpegKitFlutterPlugin.java:157: error: cannot find symbol
      public static void registerWith(final io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
                                                                                   ^
    symbol:   class Registrar
    location: interface PluginRegistry
  /Users/xxx/.pub-cache/hosted/pub.dev/ffmpeg_kit_flutter-6.0.3/android/src/main/java/com/arthenica/ffmpegkit/flutter/FFmpegKitFlutterPlugin.java:651: error: cannot find symbol
      protected void init(final BinaryMessenger messenger, final Context context, final Activity activity, final io.flutter.plugin.common.PluginRegistry.Registrar registrar, final ActivityPluginBinding activityBinding) {
                                                                                          ^
    symbol:   class Registrar
    location: interface PluginRegistry
  2 errors
  3 warnings

* Try:
> Check your code and dependencies to fix the compilation error(s)
> Run with --scan to get full insights.

BUILD FAILED in 18s

┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────┐
│ [!] Consult the error logs above to identify any broken plugins, specifically those containing  │
│ "error: cannot find symbol..."                                                                  │
│ This issue is likely caused by v1 embedding removal and the plugin's continued usage of removed │
│ references to the v1 embedding.                                                                 │
│ To fix this error, please upgrade your current package's dependencies to latest versions by     │
│ running `flutter pub upgrade`.                                                                  │
│ If that does not work, please file an issue for the problematic plugin(s) here:                 │
│ https://github.com/flutter/flutter/issues                                                       │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1
@Pxelio
Copy link

Pxelio commented Feb 14, 2025

@cnkygmr The problem is that flutter has removed embedding V1. But until the plug-in is updated, this can be corrected by modifying the FFmpegKitFlutterPlugin.java file slightly to use embedding V2, which is already implemented in version 6.0.3

  1. Delete the registerWith function
  2. Remove registrar in the init function
  3. Only use V2 embedding in the init
  4. Modify the call to the init function by removing the registrar parameter.

@samuel-kings
Copy link

@Pxelio Thanks so much bro. Works for me now.
For anyone else interested: https://github.com/samuel-kings/video_trimmer_fork.git

@ruwfr
Copy link

ruwfr commented Feb 25, 2025

@Pxelio Thanks so much bro. Works for me now. For anyone else interested: https://github.com/samuel-kings/video_trimmer_fork.git

Thanks mate. Just as clarification for anyone coming across this issue:

update your pubspec.yaml by replacing the video_trimmer with a link to samuels fork

video_trimmer:
    git:
      url: https://github.com/samuel-kings/video_trimmer_fork.git

@kociubin
Copy link

kociubin commented Mar 7, 2025

@sbis04 any chance of fixing this issue in the next release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants