Android Studio "Project Structure" not coming properly

AndroidAndroid Studio

Android Problem Overview


I follow all the necessary steps for Android Studio installation. I also checked this question, but still facing the same issue.

But whenever I create any new project, following screen come. I couldn't found any project structure as I can see in Eclipse.

enter image description here

Here, I can't find any "src","res" or any file structure. Any idea, how to get proper Project Structure?

when I tried to add "New Module" following error comes to submit.

No message
java.lang.IllegalStateException: 
at com.android.tools.idea.wizard.NewModuleWizard.onFailure(NewModuleWizard.java:159)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:340)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$1.run(ExternalSystemUtil.java:364)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$6.run(ProgressManagerImpl.java:304)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:185)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:226)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:175)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:695)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:458)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:154)

When I go to Edit Configuration, can't create any module due to above error.

enter image description here

Android Solutions


Solution 1 - Android

>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.

Solution 2 - Android

Change the SDK to a level that you have installed in the SDK manager. The SDK manager can be accessed from Tools -> Android -> SDK Manager. For me, Android Studio was packaged with API Level 17 but the new project wizard tried to target API Level 18.

Solution 3 - Android

When something like that happens to me, to fix it, I go to

> File -> Project Structure -> Modules, click (+) to add a module.

To import the main module you have to search for the IML extension file to load the project structure configuration again (for example app.iml), and thats all. I hope it helps.

Solution 4 - Android

Kip2's solution worked for me with a slight variation:

1.) File -> Invalidate Cached/Restart..

once android studio restarts:

2.) File -> Sync Project with Gradle Files


Just doing "File -> Sync Project with Gradle Files" (or doing "File -> Sync with File System"), did not correct the problem. I had to invalid the cache first, and then sync the project with gradle files for the project to display properly.

Solution 5 - Android

Finally find solution.

Whenever Android Studio starts, it search for "Gradle" installation. If not found, it will download new version of it and cache it here.

C:\Documents and Settings\user\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok

Here 72srdo3a5eb3bic159kar72vok directory name may be different.

What you need to do is, download gradle-1.6-bin.zip, place it in above directory. Then decompress it there. But make sure your path should like below.

C:\Documents and Settings\crathod.SOLUSOFTINDIA\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\gradle-1.6\bin

Now, when you restart your Android Studio, Gradle will be initialized and Project will opened in Full Project Structure.

Solution 6 - Android

Modules or the project structure could also not appear because you're in a branch where *.iml files are missing. This happened for me when I was migrating from Eclipse and had decided to check back into the original branch that had the Eclipse-like project structure. What solved my problem:

  1. Checkout the branch with Android Studio-like project structure
  2. File -> Invalidate Cache & Restart

Solution 7 - Android

Also, make sure that the root iml file matches case with your root folder. Incorrectly named iml file will cause such problems.

Just delete the root iml file (you can backup if you like), close the project and re-open it. Android Studio will generate the correct iml file and the project structure will be restored.

This is tested on Android Studio 2.1

Solution 8 - Android

Before:

  enter image description here

After:

  enter image description here
  I got the java folder (src folder) and others.

Solution:

  enter image description here

  • File > Sync Project with Gradle Files

Android Studio Version: 3.2.1

Note: This case did not appear on the old version. For example, 1.5.1 (2016/03 before)

Keywords:

  • file explorer
  • file structure
  • file hierarchy
  • file system
  • folder & file list
  • project explorer
  • project structure
  • project hierarchy
  • disappear / gone / did not see
  • Android Studio bug / issue

Solution 9 - Android

simple way to restore

Delete the project hidden .idea file and .gradle file and restart your project this will fix your issue.

Solution 10 - Android

I deleted the app from the list of apps when you open Android Studio, then I reimported the project.

Solution 11 - Android

For Android Studio 2.2, you can simply click the left bottom and then select Project

enter image description here

Solution 12 - Android

In Android Studio 2.3.1, you don't have the Application module option if you wanted to add a module. The best solution is to right click your project and select "Jump to the source" from the menu. That solved my issue.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChintan RathodView Question on Stackoverflow
Solution 1 - AndroidMaddyView Answer on Stackoverflow
Solution 2 - AndroidtheblangView Answer on Stackoverflow
Solution 3 - AndroidMr.MoustardView Answer on Stackoverflow
Solution 4 - AndroidTom RutchikView Answer on Stackoverflow
Solution 5 - AndroidChintan RathodView Answer on Stackoverflow
Solution 6 - Androidkip2View Answer on Stackoverflow
Solution 7 - AndroidEren YilmazView Answer on Stackoverflow
Solution 8 - Android蔡宗容View Answer on Stackoverflow
Solution 9 - AndroidMuhammad MubeenView Answer on Stackoverflow
Solution 10 - AndroidfullmoonView Answer on Stackoverflow
Solution 11 - AndroidDream in the windView Answer on Stackoverflow
Solution 12 - AndroidJ DView Answer on Stackoverflow