Every time I launch my flutter application on my emulator I get this error:
What went wrong: A problem occurred configuring project ':path_provider_android'.
Could not load compiled classes for build file 'C:\Users\DELL\AppData\Local\Pub\Cache\hosted\pub.dev\path_provider_android-2.2.1\android\build.gradle' from cache. Failed to notify project evaluation listener. Could not get unknown property 'android' for project ':path_provider_android' of type org.gradle.api.Project. Could not get unknown property 'android' for project ':path_provider_android' of type org.gradle.api.Project.
I tried deleting the contents of the C:\Users\DELL\AppData\Local\Pub\Cache\hosted\pub.dev folder and then doing a pub get again but nothing seems to work.
I managed to resolve the problem. I replaced the contents of the build.gradle file that was in my 'path_provider_android' package with the contents that are at this link: https://github.com/flutter/packages/blob/main/packages/path_provider/path_provider_android/android/build.gradle