Tau: iOS launch failure - Conflict when used in conjunction with path_provider

Created on 29 Oct 2019  Â·  3Comments  Â·  Source: Canardoux/tau

Version of flutter_sound

1.5.1

flutter doctor

```â–¶ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G103,
locale en-NZ)
[✓] Android toolchain - develop for Android devices (Android SDK version
29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] Android Studio (version 3.4)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.4)
[!] VS Code (version 1.38.1)
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)

! Doctor found issues in 1 category.


### Platforms you faced the error (IOS or Android or both?)
iOS only

### Expected behavior
Builds and runs

### Actual behavior
Fails build with clang error
           === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
           duplicate symbol _GetDirectoryOfType in:
               /Users/jamescollins/Development/Company/app-name/build/ios/Debug-iphonesimulator/flutter_sound/libflutter_sound.a(FlutterSoundPlugin.o)
               /Users/jamescollins/Development/Company/app-name/build/ios/Debug-iphonesimulator/path_provider/libpath_provider.a(PathProviderPlugin.o)
           ld: 1 duplicate symbol for architecture x86_64
           clang: error: linker command failed with exit code 1 (use -v to see invocation)

[ +3 ms] Could not build the application for the simulator.
[ +1 ms] Error launching application on iPhone XÊ€.
```

Tested environment (Emulator? Real Device?)

iOS emulator

Steps to reproduce the behavior

Create a new flutter project
Depend on redux_persist_flutter or any other library using path_provider as a transient dependency.
Build with xCode or directly to simulator.

enhancement help wanted

Most helpful comment

As a result of my experiment, it seems that the error occurs when the GetDirectoryOfType method name in the flutter sound plug-in file and the method name GetDirectoryOfType in the path_provider package file overlap. I temporarily forked the flutter sound plugin and noticed that it ran without error when I replaced all of the method names with getDirectoryOfType1(othername).
You can fix it in 3 parts of fluttersoundPlugin.m file

Same conclusion - Thanks man!

Have created PR: #147

All 3 comments

i also meet this error i try to downgrade to 1.4.8 this and sdk version but don't work with same error
android is ok but ios (real device) dont build because this error

As a result of my experiment, it seems that the error occurs when the GetDirectoryOfType method name in the flutter sound plug-in file and the method name GetDirectoryOfType in the path_provider package file overlap. I temporarily forked the flutter sound plugin and noticed that it ran without error when I replaced all of the method names with getDirectoryOfType1(othername).
You can fix it in 3 parts of fluttersoundPlugin.m file

As a result of my experiment, it seems that the error occurs when the GetDirectoryOfType method name in the flutter sound plug-in file and the method name GetDirectoryOfType in the path_provider package file overlap. I temporarily forked the flutter sound plugin and noticed that it ran without error when I replaced all of the method names with getDirectoryOfType1(othername).
You can fix it in 3 parts of fluttersoundPlugin.m file

Same conclusion - Thanks man!

Have created PR: #147

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alby97 picture alby97  Â·  5Comments

ggirotto picture ggirotto  Â·  3Comments

farrelanelca picture farrelanelca  Â·  5Comments

felixjunghans picture felixjunghans  Â·  4Comments

palfrey picture palfrey  Â·  3Comments