title: Unable to overwrite the manifest with gradle plugin 3.3
body: <p>This is basically a copy of the text that I wrote in <a href="https://issuetracker.google.com/issues/123893861" rel="nofollow noreferrer">this issue</a> </p>
  
  <p>Any help would be appreciated:</p>
  
  <p>I'm trying to upgrade my project to gradle plugin 3.3 w/ gradle 4.10.1 and my build fails with the following error</p>
  
  <ul>
  <li>What went wrong:
  Execution failed for task ':main:processDebugManifest'.
  
  <blockquote>
    <p>java.io.FileNotFoundException: /main/property(interface org.gradle.api.file.Directory, transform(property(interface org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultProjectLayout$FixedDirectory, /main/build))))/AndroidManifest.xml (No such file or directory)</p>
  </blockquote></li>
  </ul>
  
  <p>my code is identical to the code here - <a href="https://developer.android.com/studio/known-issues#variant_api" rel="nofollow noreferrer">https://developer.android.com/studio/known-issues#variant_api</a> under "manifestOutputFile is no longer available"</p>
  
  <pre><code>android.applicationVariants.all { variant -&gt;
      variant.outputs.all { output -&gt;
          output.processManifest.doLast {
              // Stores the path to the maifest.
              String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml"
              // Stores the contents of the manifest.
              def manifestContent = file(manifestPath).getText()
  ...
          }
      }
  }
  </code></pre>
  
  <p>and this is the line that produces the error -  </p>
  
  <pre><code>def manifestContent = file(manifestPath).getText()
  </code></pre>
  
  <p><strong>Update:</strong>
  tried the solution suggested in the comment below <a href="https://stackoverflow.com/a/35537506/2482564">this answer</a> and got the following error</p>
  
  <blockquote>
    <ul>
    <li>What went wrong:
    Execution failed for task ‘:main:processDebugManifest’.
    Could not find matching constructor for: java.io.File(org.gradle.api.internal.file.DefaultProjectLayout$DefaultDirectoryVar, java.lang.String)</li>
    </ul>
  </blockquote>