JimTompkins / flutter_bass

Flutter plug-in to use the BASS audio library from un4seen Developments.
Other
11 stars 0 forks source link

Failed to load dynamic library #2

Open yuliudev opened 1 year ago

yuliudev commented 1 year ago

Hello, I would like to reference this package in my project, but I couldn't find it on pub.dev, so I used the following to add it to dependencies:

dependencies:
  flutter:
    sdk: flutter
  flutter_bass:
    git:
      url: https://github.com/JimTompkins/flutter_bass.git

The project starts normally, but clicking 'Init BASS' gives an error:

ArgumentError (Invalid argument(s): Failed to load dynamic library 'flutter_bass.framework/flutter_bass': dlopen(flutter_bass.framework/flutter_bass, 0x0001): tried: '/usr/lib/swift/flutter_bass.framework/flutter_bass' (no such file), '/usr/lib/swift/flutter_bass.framework/flutter_bass' (no such file), '/private/var/containers/Bundle/Application/B771D079-17F4-48E2-AFAE-DB136979A115/Runner.app/Frameworks/flutter_bass.framework/flutter_bass' (no such file), '/private/var/containers/Bundle/Application/B771D079-17F4-48E2-AFAE-DB136979A115/Runner.app/Frameworks/flutter_bass.framework/flutter_bass' (no such file), '/private/var/containers/Bundle/Application/B771D079-17F4-48E2-AFAE-DB136979A115/Runner.app/Frameworks/flutter_bass.framework/flutter_bass' (no such file), 'flutter_bass.framework/flutter_bass' (no such file), '/System/Library/Frameworks/flutter_bass.framework/flutter_bass' (no such file))

I would like to know how to solve this problem and hope you can upload this package to pub.dev, thank you!

JimTompkins commented 1 year ago

I had the same problem. I have not been able to refer to flutter_bass using the Github URL. As a workaround, I used the path option in the reference in pubspec.yaml:

path: ../flutter_bass where I cloned flutter_bass in the same folder my main app resides.

Are you able to build and run the flutter_bass example app? That's a good first step to make sure it finds the library.