title: Import Android Studio project from git into Android Studio (Gradle)
body: <p>I've been reading this for hours now and everyone seems to have a different approach or that the tutorials are out of date. </p>
  
  <p>Android Studio .gitignore only includes the app directory, this is on purpose. For what reason I do not know. When trying to clone the git repo Android Studio does not know how to handle it. A very annoying flaw in Android Studio.</p>
  
  <p><a href="https://stackoverflow.com/questions/16736856/what-should-be-in-my-gitignore-for-an-android-studio-project">What should be in my .gitignore for an Android Studio project?</a></p>
  
  <p>I have a remote git repo containing the project in the form:</p>
  
  <p><img src="https://i.stack.imgur.com/CtMd7.png" alt="enter image description here"></p>
  
  <p>as you can see the git repo contains the <code>/app</code> directory.</p>
  
  <p>I then try to import it via <code>Check out project from Version Control</code> and select <code>git</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/UFrbY.png" alt="enter image description here"></p>
  
  <p>Everything works, the <code>Test</code> is successful and then I click on <code>Clone</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/sfw48.png" alt="enter image description here"></p>
  
  <p>The next part I press <code>Yes</code> as git did not clone the entire project but just the essential source files:</p>
  
  <p><img src="https://i.stack.imgur.com/2au9o.png" alt="enter image description here"></p>
  
  <p>This is the part where I am lost, I am guessing I am to create the project via <code>Gradle</code>, so I select <code>Gradle</code> and press <code>Next</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/aOMVj.png" alt="enter image description here"></p>
  
  <p>What am I supposed to do here, there are apparently gradle files on the net but which one am I supposed to use:</p>
  
  <p><img src="https://i.stack.imgur.com/IygZf.png" alt="enter image description here"></p>
  
  <h2>Create project from existing sources</h2>
  
  <p>If I choose <code>Create project from existing sources</code> I get the following problem:</p>
  
  <p><img src="https://i.stack.imgur.com/CLKQL.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/GcloQ.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/POTEk.png" alt="enter image description here"></p>
  
  <p>Results in this, I was expecting <code>app</code> directory:</p>
  
  <p><img src="https://i.stack.imgur.com/7MiKM.png" alt="enter image description here"></p>
  
  <p>File structure (as you can see fela is missing a lot of files, this is when I chose create project from existing sources, MyApplication is an example of an app which was created in Android Studio):</p>
  
  <p><img src="https://i.stack.imgur.com/XYHzZ.png" alt="enter image description here"></p>