question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG]: Build failed Android with FFMpeg

See original GitHub issue

Flutter Sound Version :

flutter_sound: 8.2.0

  • Important: Result of the command : flutter pub deps | grep flutter_sound
|-- flutter_sound 8.2.0
|   |-- flutter_sound_platform_interface 8.2.0
|   |-- flutter_sound_web 8.2.0
|   |   |-- flutter_sound_platform_interface...

Severity

  • Cannot build my App

Platforms you faced the error

  • Android
  • Real device

Describe the bug Build failed due to duplicate FFMPEG classes. There is a conflict between flutter_ffmpeg and flutter_sound That makes flutter_sound unsable if we use flutter_ffmpeg in our project I am making an issue here as ffmpeg doesn’t seem to be depending on any other package and is “lower level” API that maybe flutter_sound is also using.

To Reproduce Steps to reproduce the behavior:

  1. Add the flutter_ffmpeg package to the latest version (0.4.0 at the time of this issue)
  2. Add flutter_sound: ^8.2.0
  3. Build the application on a real Android device

Logs

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.mobileffmpeg.Abi found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.AbiDetect found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.AsyncFFmpegExecuteTask found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.AsyncFFprobeExecuteTask found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.AsyncGetMediaInformationTask found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.BuildConfig found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.CameraSupport found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Config found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Config$1 found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.ExecuteCallback found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.FFmpeg found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.FFmpegExecution found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.FFprobe found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.GetMediaInformationCallback found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Level found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.LogCallback found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.LogMessage found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.MediaInformation found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.MediaInformationParser found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Packages found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Signal found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Statistics found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.StatisticsCallback found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.StreamInformation found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.util.Pair found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)
     Duplicate class com.arthenica.mobileffmpeg.util.Trio found in modules jetified-mobile-ffmpeg-full-4.4.LTS-runtime (com.arthenica:mobile-ffmpeg-full:4.4.LTS) and jetified-mobile-ffmpeg-https-4.4-runtime (com.arthenica:mobile-ffmpeg-https:4.4)

     Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

* 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 48s
Exception: Gradle task assembleDebug failed with exit code 1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
mhstollercommented, Jul 18, 2021

flutter_sound includes ffmpeg for some conversion methods between different codecs which you can use yourself, and this also allows it to support more codecs. See here: https://tau.canardoux.xyz/guides_codec.html

2reactions
mhstollercommented, Jul 18, 2021

Use flutter_sound_lite which does not include ffmpeg

Read more comments on GitHub >

github_iconTop Results From Across the Web

mobile-ffmpeg LTS build failed · Issue #600 - GitHub
I cloned the repository and tried to run ./android.sh -l . It failed at building cpu-features and stopped afterwards so I ran normal...
Read more >
Im failing to build .so file for android from FFMPEG
Im failing to build .so file for android from FFMPEG ; $TOOLCHAIN/bin/aarch64-linux-android- rm ; function build_one { ./configure --prefix=$ ...
Read more >
#5158 (Configure error with clang on Android NDK) – FFmpeg
I successfully build and run in production ffmpeg on Android (arm and x86) compiled with Android NDK's gcc. Recently, Android deprecated gcc and...
Read more >
Build fails for Android with FFMPEG=ON (#8) · Issues - GitLab
Build fails for Android with FFMPEG=ON · Arch suffix, Append the android abi to shared libraries · Java wrapper, Build the Java wrapper...
Read more >
build occt 7.4.0 lib with freeimage and ffmpeg on android ...
build occt 7.4.0 lib with freeimage and ffmpeg on android studio 3.6.2 link error ... Hello everyone. I am compiling occt7.4.0 on android...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found