can’t find referenced class kotlin.KotlinPackage Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of can’t find referenced class kotlin.KotlinPackage without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I’ve tried adding “-dontwarn kotlin.KotlinPackage” to but not working. I’m using Base64 in my code and i can’t find where is wrong. When i disable minify, there is no problem.


Warning: Base64Kt: can't find referenced class kotlin.KotlinPackage

My code

val decoded_note = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
    } else {
        android.util.Base64.decode(LocalData.with(this@MainActivity.applicationContext).read(getString(R.string.hashed_note)).toByteArray(Charsets.UTF_8), android.util.Base64.DEFAULT)
    val old_note = String(decoded_note, charset("UTF-8"))

        val new_note=note_EditText.text.toString()

        val hashed_note= if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        } else {
            android.util.Base64.encodeToString(new_note.toByteArray(charset("UTF-8")), android.util.Base64.DEFAULT)



I’ve solved my problem with cleaning up the project. Build–>Clean Build

We are here to answer your question about can’t find referenced class kotlin.KotlinPackage - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji