Android Studio 在红线中提示 "Cannot access androidx.activity.ComponentActivity"但编译正常

标签 android android-studio

Android Studio 提示 Cannot access androidx.activity.ComponentActivity在红线中,但它正在编译和运行良好。我遇到了许多 SO 帖子,例如 this并且所有建议清除缓存,删除 .idea.gradle文件,清理项目。我已经尝试了一切,但我仍然得到这个。我错过了什么吗?

enter image description here

最佳答案

对我来说更新到最后一个 appcompat依赖性有所帮助。

关于Android Studio 在红线中提示 "Cannot access androidx.activity.ComponentActivity"但编译正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59324275/

相关文章:

java - 是否有可能从 Android/Java 或 iPhone/objective-C 的代码中获取变量名称以进行调试

android - Admob 不适用于 android studio 2.0

android - ListView 在我开始新 Activity 后消失

android - Uses_​​permission 在 androidmanifest.xml 中被忽略

Android Studio - 发现不支持的 Gradle DSL 方法 : 'getProguard()

android - 无法在android studio中打开SPP

android - 如何比较设置时间和实际时间?

android - 尽管在 list 中设置了 SpeechRecognizer 的权限不足

android - 无法启动 AVD 模拟器

java - android PackageManager.DONT_KILL_APP 似乎不起作用