'Flutter: Building with plugins requires symlink support
I am getting the below error in log whenever I try to install any dependency in pubspec.yaml
Building with plugins requires symlink support.
Please enable Developer Mode in your system settings. Run
start ms-settings:developers
to open settings.
exit code 1
In lib folder, there is file named generated_plugin_registrant.dart which is also showing error, might be linked to above log error.
//
// Generated file. Do not edit.
//
// ignore_for_file: lines_longer_than_80_chars
import 'package:firebase_core_web/firebase_core_web.dart';
import 'package:printing/src/printing_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
// ignore: public_member_api_docs
void registerPlugins(Registrar registrar) {
FirebaseCoreWeb.registerWith(registrar);
PrintingPlugin.registerWith(registrar);
registrar.registerMessageHandler();
}
Solution 1:[1]
Hey I was having the same problem I just activate the development settings and run again it works for me use the command :
start ms-settings:developers
Solution 2:[2]
This worked for me:
on Windows 11 go to settings: Click on Privacy & Security and after, click on for developers option.
On for developers settings, activate the Developer mode option (Install apps from any source...).
Now try to run/build your flutter application with flutter run -d windows or flutter build windows command.
Solution 3:[3]
Installation of some plugins required special allowance. This requires permission for windows which is available in For Developer. It is much like Install from unknown source type permission.
How to allow permission:
Search Developer Settings in the start menu and open it. Under developer mode click on Install apps from any source, including loose file. Run pub-get again and you are good to go.
Solution 4:[4]
If you feel uncomfortable turning on Developer Mode to allow side loaded apps and you aren't targeting Windows OS, you can avoid doing flutter pub add package_name. Instead, clear out the old package with dart pub remove package_name manually edit your pubspec.yaml with the dependency and do a flutter pub get.
Solution 5:[5]
I'm not sure, how relevant is my answer. I got the same error, but the problem is as follows.
I accidentally change the device to 'Windows machine' instead of my mobile in VS Code. If you really want to run apps on Windows platform, you can choose other options.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | a.ak |
| Solution 2 | |
| Solution 3 | |
| Solution 4 | |
| Solution 5 | Cnu Federer |

