tekartik / process_run.dart

Process run helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install app doesn't work after executing `flutter build macos` in Flutter desktop project

zhoushuangjian001 opened this issue · comments

I have also looked at many solutions, but none of them can solve this problem. I want to follow this steps:

  1. flutter create ----platforms=macos lanes
  2. Write the following code in the main.dart file:
Future main() async {
  // This works on Windows/Linux/Mac

  var shell = Shell();

  await shell.run('''

# Display some text
echo Hello

# Display dart version
dart --version

# Display pub version
pub --version

  ''');
}
  1. Turn off the sandbox for debug and release
  2. flutter build macos
  3. Use xcode's Product -> Archive to generate the installer

same do i

When you run in debug mode and when built in release mode, the environment is different. dart will likely be in your path in debug mode and maybe not in release mode. You can try to print the Platform.environment variable to see the differences.

The solution if that is the problem: Try to find a way to find the full path of the executable your are launching.