Reputation: 56
I used path_provider plugin and it shows this error.
Plugin project :path_provider_macos not found. Please update settings.gradle.
P.S I recently updated flutter.
Upvotes: 4
Views: 4374
Reputation: 91
Open android folder and go to settings.gradle , modify code to this :
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
I hope this solve your problem !
Upvotes: 1
Reputation: 392
This is the solution that I had found to fix it.
Upvotes: 5