Flutter: Building with plugins requires symlink support

Viewed 34768

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();
}
9 Answers

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...).

Representation

Now try to run/build your flutter application with flutter run -d windows or flutter build windows command.

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

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.

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.

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.

Go to Windows settings. Select Update & Security. On that, select For Developers. In that window, there is an option called Install apps from any source, including loose files on the Developer Mode. Enable that option.

This happens when you are running on flutter 3.0 and above; The error only occurs when your selected device is Windows OS. If your are not developing a windows application, you can just change your selected device to your android emulator or your physical mobile phone.

If you are developing a windows application then you need to turn ON developers option on your windows device to allow debugging.

For Windows 10 Go to cmd add this command > start ms-settings:developers it will appear Settings Window allow developer mode Allow developer mode

directly go to search of window and search

developer settings

and you will see the

developer mode and make it yes.

Related