Android Studio project files not showing up

浪子不回头ぞ 提交于 2019-12-21 08:51:43

问题


I have a library project in Android Studio that has been working fine, but today I went to work on it and all of the files are missing except for a few git files. The folders/files are there when I look in the project's folder on my hard drive, they just aren't displaying in Android Studio. Here is a screenshot:

I tried reinstalling and updating Android Studio, but it didn't work. Any ideas as to what is going on here? How can I fix it?


回答1:


Try Import Project... and navigate to your project. Select build.gradle file.

Be sure to wait for a while, so that android studios can load all your stuff. Sometimes a restart will help, but since you reinstalled it, that shouldn't be the problem.




回答2:


Go to File > Project Structure > Project Settings > Modules.

Click on the green colored + and add new module. select Application module and set the content root to your project module.

Click next and then finish.

This should do the trick and the complete project structure will appear. It worked for me.




回答3:


I had to Sync Project with Gradle Files in Android Studio to get my files back after they disappeared in Android Studio's Project window.




回答4:


Go to

File > Project Structure> click on + > then set it to android



回答5:


In my case i have a slash in the subproject settings.gradle

As an example, this did not work:

include ":somedir/library"

But changing it to this fixed it:

include ":somedir-library"
project(":somedir-library").projectDir = new File(settingsDir, "somedir/library")


来源:https://stackoverflow.com/questions/27082379/android-studio-project-files-not-showing-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!