In Linux, there's a problem when .so files (dynamic libraries) get copied into plugin/linux they're not found when running.
I've added a run script that changes the LD_LIBRARY_PATH, which is the path that Linux uses to search for dynamic libraries.
After the execution is completed, the environment variable is reset back to the previous value.
Usage:
Go into the root of your project and execute ./sh/linux_run, and it should execute the same way as it does on other platforms when you run flutter run -d <platform>.
Notes:
I'm not sure this is the best approach, but it's the best I've managed to get working.
In Linux, there's a problem when
.so
files (dynamic libraries) get copied intoplugin/linux
they're not found when running.I've added a run script that changes the
LD_LIBRARY_PATH
, which is the path that Linux uses to search for dynamic libraries.After the execution is completed, the environment variable is reset back to the previous value.
Usage:
Go into the root of your project and execute
./sh/linux_run
, and it should execute the same way as it does on other platforms when you runflutter run -d <platform>
.Notes: