Error "$flutterSdkpath\packages\flutter_tools\gradle\app_plugin_loader.gradle" while running the app

Flutter projects created on the master channel will generate an android/settings.gradle file that points to a file in the Flutter tool that's present in 1.18.0-dev.5.0 (currently on the master, dev, and beta channels, but not stable).

Switching from master -> stable "downgrades" Flutter relative to that change, and the file is no longer present.

You can work around this by regenerating your android/settings.gradle while on stable:

$ rm android/settings.gradle
$ flutter create .

See the GitHub issue for more details.


Just replace the current setting.gradle file code with you wanna running version project setting.gradle. e.g: Other version project : android>setting.gradle

This code will be your current flutter version just replace your setting.gradle with old one or other project

Settings.gradle

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
}

Just downgrade the recent library/package you used and you'll be just fine