Q: Could not resolve project :url_launcher_macos I create new app in flutter and it's work when I run it, but when I add shared_preferences package, I got this error when I run it

Could not determine the dependencies of task ':url_launcher:compileDebugAidl'.
  Could not resolve all task dependencies for configuration ':url_launcher:debugCompileClasspath'.
  Could not resolve project :url_launcher_macos.
       Required by:
           project :url_launcher
  Unable to find a matching configuration of project :url_launcher_macos:
            - None of the consumable configurations have attributes.


A: I have faced the same problem and i have fixed this with running following command:
flutter pub cache repair

If this is not working then please try the following:
flutter channel stable then run the commands
flutter clean and flutter upgrade

A: Neither package is compatible with mac

A: 
This worked for me

NOTE:- CLOSE THE FLUTTER PROJECT

*

*Go to Flutter sdk path

*Enable the view hidden files in Mac by using CTRL + SHIFT + .

*Go to .pub-cache

*Go to hosted

*Go to pub.dartlang.org

*delete this folder url_launcher_macos

*Open the project and run app

