dart2native is not recognized

273 Views Asked by At

First I install the flutter that contains the dart-sdk at C:\src\flutter\bin\cache\dart-sdk and I added this path to the environment variables but I still get 'dart2native' is not recognized as an internal or external command, operable program or batch file. after I ran dart2native

Then I install the dart-SDK by using the choco (follow docs) and adding this path to the environment variables. but I still get this error. How to fix that?

1

There are 1 best solutions below

2
julemand101 On BEST ANSWER

The dart2native command was removed in Dart 2.15.0 released 2021-12-08. From the changelog:

Breaking change #46100: The standalone dart2native tool has been removed as previously announced. Its replacements are the dart compile exe and dart compile aot-snapshot commands, which offer the same functionality.

https://github.com/dart-lang/sdk/blob/2.15.0/CHANGELOG.md#dart-command-line