title: Android Studio build errors when project is in a subfolder of Github
body: <p>I created a new project in Android Studio and I put the project folder inside another folder in Github. It's like this <code>Code/ProjectName</code></p>
  
  <p>However I'm having problems when I try to build my project with Gradle, this is the output in the Gradle Console:</p>
  
  <pre><code>Executing tasks: [:app:generateDebugSources, :app:generateDebugTestSources]
  
  Configuration on demand is an incubating feature.
  :app:preBuild
  :app:preDebugBuild
  :app:checkDebugManifest
  :app:preReleaseBuild
  :app:prepareComAndroidSupportAppcompatV72103Library UP-TO-DATE
  :app:prepareComAndroidSupportSupportV42103Library UP-TO-DATE
  :app:prepareDebugDependencies
  :app:compileDebugAidl UP-TO-DATE
  :app:compileDebugRenderscript UP-TO-DATE
  :app:generateDebugBuildConfig UP-TO-DATE
  :app:generateDebugAssets UP-TO-DATE
  :app:mergeDebugAssets UP-TO-DATE
  :app:generateDebugResValues UP-TO-DATE
  :app:generateDebugResources UP-TO-DATE
  :app:mergeDebugResources
  C:\Users\UserName\Documents\ProjectName\Code\ProjectName-Ver-0\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-mdpi\abc_switch_track_mtrl_alpha.9.png ERROR: Unable to open PNG file
  C:\Users\UserName\Documents\ProjectName\Code\ProjectName-Ver-0\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-hdpi\abc_ic_ab_back_mtrl_am_alpha.png ERROR: Unable to open PNG file
  
  Error: Failed to run command:
      C:\Users\UserName\Desktop\UserName\Java\AndroidStudioSDK\build-tools\21.1.2\aapt.exe s -i C:\Users\UserName\Documents\ProjectName\Code\ProjectName-Ver-0\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-hdpi\abc_ic_ab_back_mtrl_am_alpha.png -o C:\Users\UserName\Documents\ProjectName\Code\ProjectName-Ver-0\app\build\intermediates\res\debug\drawable-ldrtl-hdpi-v17\abc_ic_ab_back_mtrl_am_alpha.png
  Error Code:
      42
  Output:
      C:\Users\UserName\Documents\ProjectName\Code\ProjectName-Ver-0\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-hdpi\abc_ic_ab_back_mtrl_am_alpha.png ERROR: Unable to open PNG file
  
  :app:mergeDebugResources FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:mergeDebugResources'.
  &gt; Error: Failed to run command:
      C:\Users\UserName\Desktop\UserName\Java\AndroidStudioSDK\build-tools\21.1.2\aapt.exe s -i C:\Users\UserName\Documents\ProjectName\Code\ProjectName-Ver-0\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-hdpi\abc_ic_ab_back_mtrl_am_alpha.png -o C:\Users\UserName\Documents\ProjectName\Code\ProjectName-Ver-0\app\build\intermediates\res\debug\drawable-ldrtl-hdpi-v17\abc_ic_ab_back_mtrl_am_alpha.png
  Error Code:
      42
  Output:
      C:\Users\UserName\Documents\ProjectName\Code\ProjectName-Ver-0\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\drawable-ldrtl-hdpi\abc_ic_ab_back_mtrl_am_alpha.png ERROR: Unable to open PNG file
  
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  
  Total time: 11.013 secs
  </code></pre>
  
  <p>Not only that.</p>
  
  <p>I also get an error that says <code>Cannot resolve symbol 'R'</code></p>
  
  <p>I think it has to do with the fact that the project code is inside a sub folder of Github. But I need to have it there.</p>
  
  <p>I created another project to test and I don't get any of this error since is not connected to Github.</p>
  
  <p><strong>Extra</strong>:
  So I confirmed that if I take the project folder out of the Github root folder, the project does not show me these errors when I open it on Android Studio.</p>
  
  <p>If anyone knows why does this happen and there is a way to fix it, I would really appreciate it. </p>