0

I have a .kt Fragment file in my project and I'm trying to start a new activity with the following code:

profilePref?.setOnPreferenceClickListener {
            val profileIntent = Intent(activity, ProfileActivity::class.java)
            startActivity(profileIntent)
            true
        }

I have included both

implementation ("org.jetbrains.kotlin:kotlin-reflect:1.7.10")

in my module build.gradle and

classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"

in my project build.gradle, but the class.java still gives me unresolved reference and I'm not really sure why, any help would be appreciated.

Dr Mido
  • 2,414
  • 4
  • 32
  • 72
ch4se
  • 3
  • 3
  • 1
    Refer here: https://stackoverflow.com/a/45518762/6784846 – Annamalai Palanikumar Sep 29 '22 at 04:06
  • Thanks for the reply but that doesn't answer anything, if you read the question you'll see that I have done exactly as the other post said, but am getting an unresolved reference error on .java. – ch4se Sep 29 '22 at 20:06

0 Answers0