Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AndroidManifest.xml The markup in the document following the root element must be well formed

Tags:

android

xml

I have got Eclipse to generate a Basic android Hello World app, But it has 2 errors: first, in my AndroidManifest.xml on these two lines:
I get The markup in the document following the root element must be well formed, Also My R.java Will not generate, no matter how many times I clean my project. Any Answers?

the manifest is here: http://jsfiddle.net/NHDU6/

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.jfkingsley.maclogin"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>


<!--
     Declare the contents of this Android application.  The namespace
     attribute brings in the Android platform namespace, and the package
     supplies a unique name for the application.  When writing your
     own application, the package name must be changed from "com.example.*"
     to come from a domain that you own or have control over.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.jfkingsley.maclogin" >

    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.SET_WALLPAPER" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />

    <application
        android:icon="@drawable/ic_launcher_home"
        android:label="@string/home_title" >
        <activity
            android:name="Home"
            android:launchMode="singleInstance"
            android:stateNotNeeded="true"
            android:theme="@style/Theme" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="Wallpaper"
            android:icon="@drawable/bg_android_icon"
            android:label="Wallpaper" >
            <intent-filter>
                <action android:name="android.intent.action.SET_WALLPAPER" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Thanks, Jonathan

like image 487
Excalibur Avatar asked Nov 19 '25 23:11

Excalibur


1 Answers

Here is your manifest,

You should not specify more than one Manifest and You should not specify more than one <application> tags.

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

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.SET_WALLPAPER" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="h" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="Home"
            android:launchMode="singleInstance"
            android:stateNotNeeded="true" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="Wallpaper"
            android:icon="@drawable/ic_launcher"
            android:label="Wallpaper" >
            <intent-filter>
                <action android:name="android.intent.action.SET_WALLPAPER" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>

</manifest>
like image 199
Kartihkraj Duraisamy Avatar answered Nov 21 '25 13:11

Kartihkraj Duraisamy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!