1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Plugin [id: 'kotlin-android'] was not found

Discussão em 'Mobile' iniciado por Stack, Novembro 4, 2024 às 12:02.

  1. Stack

    Stack Membro Participativo

    I am getting this error when building the project in Flutter. I think it's related to the Kotlin plugin not being found.

    FAILURE: Build failed with an exception.

    * Where:
    Build file 'C:\Users\MOTAP ERP\StudioProjects\restaurant\android\app\build.gradle' line: 3

    * What went wrong:
    Plugin [id: 'kotlin-android'] was not found in any of the following sources:

    - Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/7.5/userguide/standard_plugins.html for available core plugins)
    - Included Builds (None of the included builds contain this plugin)
    - Plugin Repositories (plugin dependency must include a version number for this source)

    * 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

    BU�LD FAILED in 877ms
    Exception: Gradle task assembleDebug failed with exit code 1



    Kotlin plugins appear to be installed. I tried the solutions I found on the web.

    My app/build gradle and build.gradle file is as follows

    app/build.gradle:

    plugins {
    id "com.android.application"
    id "kotlin-android"
    id "dev.flutter.flutter-gradle-plugin"
    }

    kotlinOptions {
    jvmTarget = '1.8'
    }

    sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
    }
    }

    flutter {
    source '../..'
    }

    dependencies {
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    }


    android/build.gradle:

    buildscript {

    ext.kotlin_version = "1.7.10"

    repositories {
    google()
    mavenCentral()


    dependencies {
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
    }

    allprojects {
    repositories {
    google()
    mavenCentral()
    }
    }





    How can I solve this problem?

    Continue reading...

Compartilhe esta Página