'The plugin `path_provider_android` doesn't have a main class defined

Since i wasn't using the plugin path_provider anymore i tried to delet it, then it gave me a warning, so i deleted a folder caled "data" know i'm trying to do flutter pub get and it shows this error enter image description here

I tried deleting the pubspec.lock and doing flutter clean but nothing, when i try to run the app shows this

enter image description here

this is my dependecies

enter image description here



Solution 1:[1]

Try Invalidate caches/restart but not sure it will works or not

enter image description here

Solution 2:[2]

April, 17 2022 Just delete the

pubspec.lock

inside your flutter application.

location of that file: (Flutter project name)/pubspec.lock

then run

flutter clean

and then

flutter pub get

it will just again create that .lock file for and you are good to go.

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
Solution 2 M.Adnan Ijaz