简体   繁体   English

如何修复Android Studios项目文件布局

[英]How to fix the Android studios project file layout

Typically when I use Android studios the project files on the side bar are all nice, organized and clean; 通常,当我使用Android Studio时,侧栏上的项目文件都很漂亮,井井有条,而且干净整洁。 having App - (manifest, java, res, assets) Gradle Scripts - 具有App-(清单,java,res,资产)Gradle脚本-

I like when it is like that. 我喜欢那样的话。 But for some reason, every so often when I open a project, typically one that I did on another computer with Android Studios, the files come in all expanded, That is they look like they just came out of the folder looking something like this: .gradle- .idea- app -(build, libs, src, .gitIgnore, app.iml, build.gradle, progaurd-rules.pro) build- gradle- And Still more. 但是由于某种原因,当我打开一个项目(通常是我在另一台装有Android Studios的计算机上完成的项目)时,文件会全部展开,也就是说,它们看起来就像是从文件夹中出来的,看起来像这样: .gradle- .idea- app-(build,libs,src,.gitIgnore,app.iml,build.gradle,progaurd-rules.pro)build-gradle-还有更多。 It is messy any unorganized. 任何杂乱无章的东西都是混乱的。 Even more, my namespaces are all expanded, so when I view files I have to expand the folders way out. 更重要的是,我的命名空间都已扩展,因此当我查看文件时,必须扩展文件夹。 Android studios when working the way I like puts the namespaces into one folder, that is there will be a folder that is called com.etc.whatever and it doesn't have to be expanded way out. Android Studio在按我喜欢的方式工作时将名称空间放在一个文件夹中,也就是说,无论如何都将存在一个名为com.etc。的文件夹,并且不必进行扩展。

So how do I get it back to normal? 那么如何使它恢复正常呢?

You must change your project structure to Packages. 您必须将项目结构更改为Packages。 it may work. 它可能会起作用。 explore the other option given in project structure. 探索项目结构中给出的其他选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM