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 symbol '_GetDirectoryOfType' #43871

Closed
songshitong opened this issue Oct 31, 2019 · 2 comments
Closed

duplicate symbol '_GetDirectoryOfType' #43871

songshitong opened this issue Oct 31, 2019 · 2 comments

Comments

@songshitong
Copy link

songshitong commented Oct 31, 2019

Steps to Reproduce

  1. add dependencies
    dependencies:
    path_provider: ^1.4.0
    flutter_sound: ^1.5.1
  2. console
    flutter run on ios simulator IPhone 8 Plus
  3. error
duplicate symbol '_GetDirectoryOfType' in:
        /Users/FlutterWorkspace/flutterdemo/build/ios/Debug-iphonesimulator/flutter_sound/libflutter_sound.a(FlutterSoundPlugin.o)
        /Users/FlutterWorkspace/flutterdemo/build/ios/Debug-iphonesimulator/path_provider/libpath_provider.a(PathProviderPlugin.o)
    ld: 1 duplicate symbol for architecture x86_64

Logs

 1 warning generated.
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
    duplicate symbol '_GetDirectoryOfType' in:
        /Users/FlutterWorkspace/flutterdemo/build/ios/Debug-iphonesimulator/flutter_sound/libflutter_sound.a(FlutterSoundPlugin.o)
        /Users/FlutterWorkspace/flutterdemo/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)

Could not build the application for the simulator.
Error launching application on iPhone 8 Plus.

flutter doctor -v

[✓] Flutter (Channel dev, v1.10.14, on Mac OS X 10.15 19A602, locale zh-Hans)
    • Flutter version 1.10.14 at /Users/issmac/Library/Android/flutter
    • Framework revision 1946fc4da0 (3 weeks ago), 2019-10-07 15:23:31 -0700
    • Engine revision 1d62160fdb
    • Dart version 2.6.0 (build 2.6.0-dev.1.0 d6c6d12ebf)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at /Users/issmac/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.1, Build version 11A1027
    • CocoaPods version 1.8.3

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] VS Code (version 1.39.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • Redmi Note 4  • AQZ5JZ89IJ65OFOR                     • android-arm64 • Android 6.0 (API 23)
    • iPhone 8 Plus • 398E1090-0C64-4FF3-8546-D36D8D0B2D88 • ios           • com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)

! Doctor found issues in 1 category.

Anothor
I found the code ### GetDirectoryOfType but do not known how to solve it

in flutter_sound/FlutterSoundPlugin.m

NSString* GetDirectoryOfType(NSSearchPathDirectory dir) {
  NSArray* paths = NSSearchPathForDirectoriesInDomains(dir, NSUserDomainMask, YES);
  return [paths.firstObject stringByAppendingString:@"/"];
}

in path_provider/PathProviderPlugin.m

NSString* GetDirectoryOfType(NSSearchPathDirectory dir) {
  NSArray* paths = NSSearchPathForDirectoriesInDomains(dir, NSUserDomainMask, YES);
  return paths.firstObject;
}

Last
Hoping flutter more and more better !

@BondarenkoStas
Copy link

@songshitong It seems not to be related to Flutter sdk, but to implementation of flutter_sound. The issue is open here Canardoux/flutter_sound#146 and is related to Canardoux/flutter_sound#141 commit in v1.5.0. Before that is fixed I think you can use lower version of flutter_sound. Closing the issue here.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants