title: Cordova build android:':app:mergeDebugResources'. failing in Jenkins
body: <p>After updating the android studio, gradle version and Cordova (incl. platforms) for hybrid project in windows 10 recently, i got this error in Jenkins.</p>
  
  <pre><code> :app:mergeDebugResourcesC:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.4.0.aar\76d6a769daf730ed767830374ebcd3bd\res\drawable\abc_btn_colored_material.xml: error: file not found.
  
    ...
    ...
  
   Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
   :app:mergeDebugResources FAILED
  
   FAILURE: Build failed with an exception.
  
   * What went wrong:
   Execution failed for task ':app:mergeDebugResources'.
   &gt; Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
  
   * Try:
   Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  </code></pre>
  
  <p>I searched for a solution for this which should be dynamical and can be managed through Jenkins itself since it is not possible to edit individual platform files.</p>
  
  <p><strong>Originally</strong> the error was</p>
  
  <pre><code> Execution failed for task ':mergeDebugResources'.
   &gt; Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file
  </code></pre>
  
  <p>which was caused by </p>
  
  <blockquote>
    <p>Error: File path too long on windows, keep below 240 characters</p>
  </blockquote>
  
  <p><strong><em>Workaround</em></strong> for this was to change workspace folder so it is coming to a top level. (eg: C:/Users/[youruser]/yourfolder. Check the link <a href="https://stackoverflow.com/a/28035838/5850835">here</a></p>
  
  <p><strong><em>Note</strong>
  I added this question and the answer, for the self reference in future and to assist someone who is working with Jenkins.</em></p>