无法访问 ‘androidx.savedstate.SavedStateRegistryOwner’

huangapple go评论119阅读模式
英文:

Cannot access 'androidx.savedstate.SavedStateRegistryOwner'

问题

很不幸,但由于未知原因,这个类被用红色下划线标出,并出现以下信息:无法访问 androidx.savedstate.SavedStateRegistryOwner。

我该如何修复它?

我该如何解决这个问题?谢谢。

英文:

Unfortunately, but for unknown reasons this class is underlined in red and the following message appears: Cannot access androidx.savedstate.SavedStateRegistryOwner.

How can I fix it?

How can I solve this problem? thanks.

答案1

得分: 2

一个更新后的回答。
我曾遇到相同的问题,
android.appcompat:appcompat:1.5.1
所以在我切换到
androidx.appcompat:appcompat:1.4.0 之后问题得以解决。

英文:

an updated answer.
I had the same issue with

android.appcompat:appcompat:1.5.1

so it's been fixed after I had switched to

androidx.appcompat:appcompat:1.4.0

答案2

得分: 1

根据blue mei所说,对我来说,将androidx.appcompat:appcompat的版本从1.2.0更改为1.3.0-alpha02帮助我解决了这个问题。

英文:

As blue mei said, for me, changing androidx.appcompat:appcompat:1.2.0 to 1.3.0-alpha02 helped me solved the problem.

答案3

得分: 0

我也遇到了这个错误,而且没有任何建议的修复方法起作用;我通过在“文件”菜单下的Android Studio中选择使缓存无效/重新启动功能来解决了这个问题。

英文:

I had this error too and none of the proposed fix helped; I got rid of the issue by selecting the Invalidate Cache / Restart function in Android Studio under the "File" menu.

huangapple
  • 本文由 发表于 2020年9月19日 20:06:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/63968605.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定