问题
my android studio started working with kotlin and not java after the last update. I have a university project that I need to deliver soon and we only learned coding with java, can anyone please help me find a way to return it to java thanks a lot
回答1:
If I understand your problem correctly, when you create new project you have to uncheck "Include Kotlin support" checkbox at the bottom of "Create new project" window. And remember that you can create java classes in Kotlin project.
回答2:
If you would like disable Kotlin in your project you should delete MainActivity.kt
and remove next lines
build.gradle(Project)
//classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:<kotlin_version>"
build.gradle(App)
//apply plugin: 'kotlin-android'
//apply plugin: 'kotlin-android-extensions'
dependencies {
...
//implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:<kotlin_version>"
}
来源:https://stackoverflow.com/questions/49302552/make-android-studio-work-with-java-and-not-kotlin