I'm encountering a Gradle error in my Flutter project that I can't seem to resolve. When I try to build and run my Flutter app, I get the following error:
Could not apply requested plugin [id: 'dev.flutter.flutter-gradle-plugin', version: '1.0.0'] as
it does not provide a plugin with id 'dev.flutter.flutter-gradle-plugin'. This is caused by an
incorrect plugin implementation. Please contact the plugin author(s).
> Plugin with id 'dev.flutter.flutter-gradle-plugin' not found.
This error is triggered in the build.gradle file of my app module on this line:
apply plugin: 'dev.flutter.flutter-gradle-plugin'
Please let me know if you need any further information to assist me in troubleshooting this issue. Thank you!
Update settings.gradle Ensure your android/settings.gradle file includes the Flutter plugin path:
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
return properties.getProperty("flutter.sdk")
}()
settings.ext.flutterSdkPath = flutterSdkPath
includeBuild("${flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
include ':app'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With