rijalanupraj
rijalanupraj

Reputation: 56

Plugin project :path_provider_macos not found. Please update settings.gradle

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

Answers (2)

ABDULKARIM ALBAIK
ABDULKARIM ALBAIK

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

Sudhanshu Bhagwat
Sudhanshu Bhagwat

Reputation: 392

This is the solution that I had found to fix it.

  1. Go to your FlutterSDK folder, then go to .pub-cache\hosted\pub.dartlang.org\
  2. Then delete path_provider_macos-{version}

Upvotes: 5

Related Questions