Plugin with id 'com.android.application' not found. Flutter Error

Viewed 111

All files are correct, why do I get an error when it runs? Can you help me? I really got into trouble!

android / build.gradle :

    dependencies {
        classpath 'com.google.gms:google-services:4.3.10'
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }

android / app / build.gradle :

apply plugin: 'com.android.application'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

ERROR TEXT IN CONSOLE

Launching lib/main.dart on sdk gphone x86 in debug mode...
lib/main.dart:1

FAILURE: Build failed with an exception.

* Where:
Build file '/home/blackhat/IdeaProjects/amazon/android/app/build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':app'.
> Plugin with id 'com.android.application' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
0 Answers
Related