Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
877 stars 573 forks source link

[BUG] duplicate symbol '_OBJC_CLASS_$_AudioPlayer' and duplicate symbol '_OBJC_METACLASS_$_AudioPlayer' #542

Closed rainerlonau closed 3 years ago

rainerlonau commented 3 years ago

Flutter Sound Version :

Using these sound dependencies at the moment. I couldn´t get just_audio recorder working. Therefore I´m moving to flutter_sound. For now I only want to use flutter_sound recorder.

Sound

flutter_sound: ^6.4.7+1

Sound play

audio_session: ^0.0.9 just_audio: ^0.5.7


Severity

Cannot build my App


Platforms you faced the error

iOS Real device


Logs

Air-von-Rainer:ios rainermacbook$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 1.23.0-18.1.pre, on macOS 11.0.1 20B29 x86_64, locale de-DE)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[✓] Android Studio (version 4.0)
[✓] Connected device (1 available)

• No issues found!
duplicate symbol '_OBJC_CLASS_$_AudioPlayer' in:
        /Users/rainermacbook/_proj/nurii/app/_proj/nurii/build/ios/Debug-dev-iphoneos/just_audio/libjust_audio.a(AudioPlayer.o)
        /Users/rainermacbook/_proj/nurii/app/_proj/nurii/build/ios/Debug-dev-iphoneos/tau_sound_core/libtau_sound_core.a(FlautoPlayerEngine.o)
    duplicate symbol '_OBJC_METACLASS_$_AudioPlayer' in:
        /Users/rainermacbook/_proj/nurii/app/_proj/nurii/build/ios/Debug-dev-iphoneos/just_audio/libjust_audio.a(AudioPlayer.o)
        /Users/rainermacbook/_proj/nurii/app/_proj/nurii/build/ios/Debug-dev-iphoneos/tau_sound_core/libtau_sound_core.a(FlautoPlayerEngine.o)
    ld: 2 duplicate symbols for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Describe the bug Build fails due to duplicate symbol

To Reproduce Steps to reproduce the behavior:

  1. Create a new flutter project.
  2. Use these plugins:
    # Sound record
    flutter_sound: ^6.4.7+1
    # Sound play
    just_audio: ^0.5.7
  3. Use "platform :ios, '9.3'" in the Podfile.
  4. Open Xcode project and use own team for signing.
  5. Try to run the project in Xcode.

Expected behavior Build and run the app successfully.


Additional context**

I know it´s not ideal to use both sound plugins, but for now the code relies on just_audio. I also saw this issue here, without any solution: https://github.com/dooboolab/flutter_sound/issues/33

Larpoux commented 3 years ago

It is probably possible to rename AudioPlayer by TauAudioPlayer in our library.

I will see if possible to do this without a revolution in Flutter Sound ...

Larpoux commented 3 years ago

@rainerlonau : Could you try Flutter Sound 6.4.8 ?

rainerlonau commented 3 years ago

@rainerlonau : Could you try Flutter Sound 6.4.8 ?

Awesome, I can build and & run the app again. Thanks a lot, will buy you a coffee 👍