Kotlin Multipplatform - 在 Android Studio 文件夹树中看不到 Greeting.kt
我刚刚开始学习 KMM(我现在是 Android java 人员),并经历了自动放入新应用程序中的 Hello World 的默认问候语版本。我的环境似乎正常工作,因为我能够在 Android 和 iOS 模拟器上运行默认应用程序。
但是我在项目树中看不到文件 Greeting.kt。我当然可以搜索它并从“查找”中打开它,但是当我向下钻取树共享/commonMain/kotlin/com.myapp...时,它只显示平台。
我有一个屏幕盖,显示顶部打开的 Greeting.kt 的路径,但在树中不可见:(
屏幕盖)
不幸的是,我无法发布图像(没有足够的声誉),但是当我打开文件时通过在项目中查找,Greeting.kt 在屏幕顶部显示路径(我的应用程序 > 共享 > src > commonMain > kotlin > com > example > myapplication > Greeting),但是当我手动深入 Android Studio 左侧的项目树时,Greeting.kt 没有显示。
我还可以在 Mac Finder 中找到该文件。我猜 Android Studio 中的首选项不正确?
关于可能出什么问题有什么想法吗?
提前致谢
I am just starting to learn KMM (I'm an Android java guy right now) and going through the default Greeting version of Hello World that is automatically put into a new application. My environment seems to be working as I was able to run the default app on both Android and iOS emulators.
However I can't see the file Greeting.kt in the Project tree. I can certainly search for it and open it from Find, but when I drill down the tree shared/commonMain/kotlin/com.myapp... it only shows Platform.
I have a screen cap that shows the path of the open Greeting.kt at the top, but not visible in the tree:
(screen cap)
Unfortunately I can't post an image (not enough reputation), but when I open the file Greeting.kt by doing a Find In Project, it shows the path at the top of the screen (My Application > shared > src > commonMain > kotlin > com > example > myapplication > Greeting), but when I manually drill down the Project tree on the left side of Android Studio Greeting.kt does not show up.
I can also find the file in the Mac Finder. My guess a preference in Android Studio is incorrect?
Any ideas on what might be wrong?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
原来是官方的bug。解决方案是升级到 Android Studio (Chipmunk) 的 Beta 版本
我向 Google 提交了一份错误报告,他们对此进行了调查:
Turns out it was an official bug. Solution is to upgrade to Beta version of Android Studio (Chipmunk)
I submitted a bug report to Google and they looked into it: