win32 plugin build error in flutter_openvpn with Flutter 2.0 / Dart 12

290 Views Asked by At

I get this error when I build the app for iOS: Command PhaseScriptExecution failed with a nonzero exit code.

Screenshot of the build error in Xcode

1

There are 1 best solutions below

3
On

This error is caused by an old version of the win32 package that uses Dart FFI in a way that was prohibited with the release of Dart 2.12.

To fix this, update the win32 package. If the package is a transitive dependency, you can use dependency_overrides.