How to solve “Failed to parse XML in AndroidManifest.xml

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Error:

Caused by: com.android.builder.errors.EvalIssueException: Failed to parse XML in C:\Users\dharm\AndroidStudioProjects\mhn_app_doctor\android\app\src\main\AndroidManifest.xml The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.

AndroidManifest.xml

App module

Dependencies

Solution:

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

Go to the project folder, in app ->> src ->> main and modify the AndroidManifest.xml with notepad.

You need to put the -uses permission- between

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

Your manifest should be of this format:

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

    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>        
    <application 
        android:hardwareAccelerated="true">
        ...
    </application>

</manifest>
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x