Build error Failed resolution of: Lkotlin/KotlinPackage

After buying RocetWeb I am trying to run the fresh project but every time I get this error.

java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/KotlinPackage;
        at infix.imrankst1221.codecanyon.ui.splash.SplashActivity.onCreate(SplashActivity.kt:30)
        at android.app.Activity.performCreate(Activity.java:7009)
        at android.app.Activity.performCreate(Activity.java:7000)

Solution:

  • First of all, it’s an Android studio problem. If you are trying to open any Kotlin project on your PC then it’s will get the same error.
  • There is a bug in Kotlin libraries with Windows 10 Single Language Turkish. (Maybe some of the other Single Language Windows distributions have the same issue, I haven’t known yet.) Kotlin’s some libraries cannot work on the Turkish operating system. I solved this problem by installing Windows 10 Pro English.
  • So Change or Install your Windows in the English Language. More: https://stackoverflow.com/a/59832244/2535875
  • Now clear cache and build until the download complete. https://help.infixsoft.com/gradle-sync-started-with-single-variant-sync-rocketweb-android/

Only follow if the issue is not solved yet:

  • Enable multiDexEnabled true and sync the project.

Leave a Reply