Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Kotlin Support from Flutter App?

Created a new Flutter project with Kotlin support on Android Studio and it is giving the following error on running the app:-

  • What went wrong: Execution failed for task ':app:compileDebugKotlin'.

Now I just want to remove the Kotlin support from my project, please suggest the steps?

like image 455
Gagandeep Gambhir Avatar asked Sep 07 '25 03:09

Gagandeep Gambhir


1 Answers

According to your question, there might be many reasons behind...
Check out this Stack Overflow Solution if this can work.
Apart from this, To remove Kotlin support you can check your Gradle for some lines below..

buildscript {
    ext.kotlin_version = '1.2.71'
    ...

    dependencies {
        ...
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
...
apply plugin: 'kotlin-android'
...
android{
    ...
    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
    ...
}
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    ...
}

Delete all of these above to remove kotlin support in your project.

like image 124
Sanket Vekariya Avatar answered Sep 09 '25 01:09

Sanket Vekariya