“Error Parsing XML: XML declaration not well-formed” [android]

前端 未结 2 668
执念已碎
执念已碎 2021-01-25 14:28

I\'m getting the titled error in my AndroidManifest.xml file.

The error is on the line below the < / manifest>.



        
相关标签:
2条回答
  • 2021-01-25 14:29

    Try this:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.contactpicker">
        <uses-permission android:name="android.permission.READ_CONTACTS"/>
        <application android:icon="@drawable/ic_launcher">
         <activity android:name=".ContactPicker" android:label="@string/app_name">
                <intent-filter>
                    <action android:name="android.intent.action.PICK"></action>
                    <category android:name="android.intent.category.DEFAULT"></category>
                    <data android:path="contacts" android:scheme="content"></data>
                </intent-filter>
            </activity>
        <activity android:name="com.example.contactpicker.ContactPickerTester"
                  android:label="@string/title_activity_contact_picker_tester" >     
          <intent-filter>
            <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER"  />
                </intent-filter>
            </activity>
        </application>
    
    </manifest>
    
    0 讨论(0)
  • 2021-01-25 14:34

    Close your manifest tag. Add the >

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.contactpicker">
    
    0 讨论(0)
提交回复
热议问题