make Android Studio Work with Java and not Kotlin?

心已入冬 提交于 2021-02-08 08:54:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!