Android Studio suddenly shows the full name a folder in the Project view and I don’t know how to change it. I tried to change the view with the settings in the option menu in the Project view (flatten packages check/uncheck, compact empty middle packages check/uncheck), but it didn’t change.
This is how my project view used to look like:
This is how it looks now:
It seems to me that every folder inside the myapp folder suddenly has the full appid + its own name as foldername.
I tried resetting Android Studio settings by using these commands (I’m a mac user):
rm -Rf ~/Library/Preferences/AndroidStudio* rm ~/Library/Preferences/com.google.android.studio.plist rm -Rf ~/Library/Application\ Support/AndroidStudio* rm -Rf ~/Library/Logs/AndroidStudio* rm -Rf ~/Library/Caches/AndroidStudio*
Still no changes. My current Android Studio version is Android Studio 2.2, build number AI-145.3276617.
The only thing I did was to update to the latest stable Android 2.2 version yesterday, I don’t know if this changed the way the app appears, another project (the how it used to be screenshot) didn’t seem affected at all.
This seems to be an issue with the newest stable 2.2 build. I reported the issue here, no response yet: https://code.google.com/p/android/issues/detail?id=223389
Referring to this answer
This should be what you did:
Click on the settings icon of the Project toolbar and turn off Compact Empty Middle Package.
So you only need to turn it on again
Hope it helps
I had the same issue, tried all of the above, and other suggestions by other SO answers. I also had everything up to date. No luck.
However, my problem originated from a specific – messy – action I made.
I was working with a library that I (imported through/was downloaded by) gradle (as a compile only dependency).
For x reasons, I moved the sources folder around a lot, and I ended up placing it in the root of my project (next to folders like app, build, etc). After realizing the sources themselves were linked to other dependencies, I just deleted them.
Android Studio took note of each path I moved the sources to, and when it couldn’t find it in the last one, this problem arose.
In this folder (/.idea/libraries), I found a reference xml file for the poorly implemented library, among other references:
<SOURCES> <!-- paths I moved the sources to --> <root url="..wrong path.." /> <root url="..wrong path.." /> .. <!-- legit path created by gradle --> <root url=".. some temp folder .." /> </SOURCES>
Inside the xml, I removed the aforementioned paths Android Studio took note of, rebuilt the project and bam, problem solved!
Check the “Compact Middle Packages” option in project