How to remove kotlin support from a new project and work with only java support without creating a new 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.
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