Execution failed for task :app:processDebugmanifest

8k Views Asked by At

Error:Execution failed for task ':app:processDebugManifest'.

com.android.manifmerger.ManifestMerger2$MergeFailureException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.

4

There are 4 best solutions below

0
On

In my case, the AndroidManifes.xml just contains

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
...
     </manifest>

So, My issue was solved by adding the following lines in the AndroidManifest.xml file

<?xml version="1.0" encoding="utf-8"?>
<manifest 
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools">
  ...
 </manifest>
0
On

Try adding this line to your manifest file.

<manifest xmlns:tools="http://schemas.android.com/tools">

0
On

I ran into this issue as well. The error is from ManifestMerger and it made me believe it has something to do with my manifest file and that took me on a wrong path. This error can also happen in case of an invalid XML file in your resources. In my case it was a layout file that got left over from a merge conflict with nothing in it (an empty layout file) which in turn caused the issue. it also cloud be any other xml file so I would suggest opening your xml resources one at a time and see if there is any error in them (you will get the lint error when opening the file)

Hope this helps.

0
On

Check you AndroidManifest.xml file, Maybe you can find error there. If no problem, please check this in manifest tag like this way.

<?xml version="1.0" encoding="utf-8"?>
<manifest 
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools">
     ...........................................
</manifest>