作者:熊熊粉丝6888 | 来源:互联网 | 2023-02-12 01:51
ImrunningUbuntu17.10,andIvejustupdatedAndroidStudiofromversion3.0.1to3.1.Heresthe
I'm running Ubuntu 17.10, and I've just updated Android Studio from version 3.0.1 to 3.1. Here's the version information in Help -> About:
我正在运行Ubuntu 17.10,我刚刚将Android Studio从版本3.0.1更新到3.1。这是帮助中的版本信息 - >关于:
Android Studio 3.1
Build #AI-173.4670197, built on March 22, 2018
JRE: 1.8.0_152-release-1024-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.13.0-37-generic
Unfortunately, while the IDE was able to resolve android-specific references before in my (first ever) Kotlin project, in the new version it appears unable to. Here's a screenshot showing what I mean:
不幸的是,虽然IDE在我的(第一次)Kotlin项目之前能够解析特定于android的引用,但在新版本中它似乎无法解决。这是截图显示我的意思:
In Android Studio 3.1, it's claiming that core Android functions such as setContentView()
don't exist, and keeps prompting me to create an abstract function for it - which I clearly don't want to do. However, if I hit the build button, I get a BUILD SUCCESSFUL in 8s
.
在Android Studio 3.1中,它声称核心Android函数(如setContentView())不存在,并且不断提示我为它创建一个抽象函数 - 我显然不想这样做。但是,如果我按下构建按钮,我会在8s内获得一次成功。
Does anyone know why my editor is doing this, and how I get get Android-related functions and classes to resolve correctly again?
有谁知道我的编辑器为什么这样做,以及如何让Android相关的函数和类再次正确解析?
Edit: Update: I've got more information on the issue now, but it's still not resolved:
编辑:更新:我现在有关于这个问题的更多信息,但它仍然没有解决:
2 个解决方案