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

DevOps

MOTOSHARE 🚗🏍️
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
🚀 Everyone wins.

Start Your Journey with Motoshare

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.Code language: CSS (css)

AndroidManifest.xml

App module

Dependencies

Solution:

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>Code language: HTML, XML (xml)

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">Code language: HTML, XML (xml)

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>Code language: HTML, XML (xml)
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