Kotlin project in androidstudio creates bigger debug file that java project

I created a new project in androidstudio for android-java and it was configured to Kotlin. I create my files using JAVA, the code works fine, but the size of the apk file is bigger than a similar project in JAVA language. Do you know if this is a kotlin problem? Could I remove kotlin configuration? Thanks.

I tried to remove some kotlin files, but doesn`t work.

  • 1

    By”debug file” I assume you mean an APK built in debug mode (not release mode). Kotlin has a lot of libraries thus also a lot more classes that have to included into the app. Code requires space and so the app gets bigger.

    – 

  • My problem is that I dont want to use Kotlin, but Android Studio dont let me do it without him. I tried some sugestions that I found in stackoverflow, but when I check JAVA language, dont remove me kotlin option.

    – 

  • There is an error, in the way you try. It is highly possible to create an Android Project with Android Studio in Java. You can also create Java files, within your kotlin project as well

    – 

  • A lot of app templates AS provides only allow Kotlin language. But even if you have such a project you should be able to remove all Kotlin files from your project and remove Kotlin from Gradle (plugin, libraries, …) . Or you restart with a pure Java project.

    – 

Leave a Comment