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

Duplicate class I'm already using ffmpeg_kit_flutter_audio in my code: 5.1.0-LTS for audio conversion #129

Closed
appstarsbiblia opened this issue Dec 13, 2022 · 4 comments

Comments

@appstarsbiblia
Copy link

appstarsbiblia commented Dec 13, 2022

I'm already using ffmpeg_kit_flutter_audio in my code: 5.1.0-LTS
for audio conversion, when you put the
video_editor:
general the error, is there any way to solve it?

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.arthenica.ffmpegkit.Abi found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.AbiDetect found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.AbstractSession found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.AsyncFFmpegExecuteTask found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.AsyncFFprobeExecuteTask found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.AsyncGetMediaInformationTask found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.BuildConfig found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.CameraSupport found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.Chapter found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFmpegKit found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFmpegKitConfig found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFmpegKitConfig$1 found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFmpegKitConfig$2 found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFmpegKitConfig$SAFProtocolUrl found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFmpegSession found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFmpegSessionCompleteCallback found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFprobeKit found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFprobeSession found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.FFprobeSessionCompleteCallback found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.Level found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.Log found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.LogCallback found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.LogRedirectionStrategy found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.MediaInformation found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.MediaInformationJsonParser found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.MediaInformationSession found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.MediaInformationSessionCompleteCallback found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.NativeLoader found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.Packages found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.ReturnCode found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.Session found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.SessionState found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.Signal found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.Statistics found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.StatisticsCallback found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)
     Duplicate class com.arthenica.ffmpegkit.StreamInformation found in modules jetified-ffmpeg-kit-audio-5.1.LTS-runtime (com.arthenica:ffmpeg-kit-audio:5.1.LTS) and jetified-ffmpeg-kit-min-gpl-5.1-runtime (com.arthenica:ffmpeg-kit-min-gpl:5.1)

     Go to the documentation to learn how to Fix dependency resolution errors.

* 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 6s
Exception: Gradle task assembleDebug failed with exit code 1
@worldwidee
Copy link

same issue

@LeGoffMael
Copy link
Owner

LeGoffMael commented Jan 2, 2023

It seems that there is duplicate classes between the ffmpeg_kit_flutter_audio dependency you're using and video editor which is currently using ffmpeg_kit_flutter_min_gpl.

One solution could be to fork this repo and change the ffmpeg_kit_flutter_min_gpl to ffmpeg_kit_flutter_full_gpl, and do the same for ffmpeg_kit_flutter_audio. The full_gpl package seems to contains all the libraries you need (ffmpeg-kit doc).

Another solution would be to create your own custom ffmpeg package that answer to your needs (cf ffmpeg-kit doc)

@LeGoffMael
Copy link
Owner

this limitation will be fixed by #146

@LeGoffMael
Copy link
Owner

The latest version 3.0.0 is out.
FFmpeg is not included in this package anymore, it should solve all duplication sort of error

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

3 participants