How to remove Kotlin support from an Android project?
Step 1: Delete or comment-out these lines from build.gradle (Project)
file.
ext.kotlin_version = '1.1.51' // My kotlin_version might be different from yours.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Step 2: Delete or comment-out these lines from build.grale (Module)
file
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
Step 3: Then hit Sync Now
.
Note: Whenever you navigate to kotlin classes, you will see a popup always display on their header and the code is still highlighted.
To remove this popup and do not highlight kotlin code, go to File -> Settings
to disable Kotlin plugin.
Then hit on Apply -> OK
, after that a dialog will display to notify you reset Android Studio, just hit reset. Next time you open the project, the popup is gone and kotlin code is not highlighted anymore. It just like a normal file in your project.
You have to remove this lines from your build.gradle
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
and
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"