0

I am using the latest Android studio build (of 2023.3.1.) I'm trying to include the following package:

import androidx.appcompat.app.AppCompatActivity

I get the following error: (referring to line 3 of MainActivity.kt)

Unresolved reference: app: 3

Why can't this package be found? What has this package been superseded by?

2
  • Well how are you adding the dependency for that class? Also, is that the whole error? "app: 3" makes little sense ... Commented May 18, 2024 at 2:33
  • Ok, found the solution eventually. In build.gradle.kts, add this to dependencies: dependencies { val appcompat_version = "1.6.1" implementation("androidx.appcompat:appcompat:$appcompat_version") [See: developer.android.com/jetpack/androidx/releases/appcompat#kts] I also did: 'clean project' and 'rebuild project'. Commented May 19, 2024 at 3:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.