I made a new project using Eclipse (API level 14, BlankActivity, Tabs+Swipe.)
The entire src folder contains #Override errors which I can fix.
However, the AndroidManifest.xml file shows an error:
The markup in the document following the root element must be well-formed.
How do I fix this?
Here is the unchanged, default xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sohamchowdhury.ferric"
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" >
</application>
</manifest><manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sohamchowdhury.ferric"
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=".AspectListActivity"
android:label="#string/title_aspect_list" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".AspectDetailActivity"
android:label="#string/title_aspect_detail" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".AspectListActivity" />
</activity>
</application>
</manifest><manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sohamchowdhury.ferric"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
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>
You have more than one manifest tags inside your xml file.
Remove the following part from your code.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sohamchowdhury.ferric"
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" >
</application>
</manifest>
And make sure you have xml declaration present on very first line of your manifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
Related
I'm using the newest sdk bundle with eclipse, and in a real simple app there is no Icon after launch and it's really bothering me why?
Can someone explain me what i'm doing wrong?
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Here it is.. I'm getting Parser exception for C:\Users\your name here\sandorfalot\WobblyPsyche\AndroidManifest.xml: The markup in the document following the root element must be well-formed.
This is a syntax error, right?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.WobblyPsyche"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/WobblyPsyche"
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>
How about this?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.WobblyPsyche"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/WobblyPsyche"
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>
try adding this to the beginning
<?xml version="1.0" encoding="utf-8"?>
and changing your activity name line to this
android:name="com.example.WobblyPsyche.MainActivity"
My manifest.xml is,
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pilot.clicker"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<!-- Required -->
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar" >
<meta-data android:name="com.revmob.app.id" android:value="52eb635c38a33"/>
<activity android:name="com.revmob.ads.fullscreen.FullscreenActivity"
android:theme="#android:style/Theme.Translucent"
android:configChanges="keyboardHidden|orientation">
</activity>
<activity
android:name="com.pilot.clicker.Splash"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.pilot.clicker.Main"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.pilot.clicker.MAINSCREEN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:label="#string/app_name" android:name="com.pilot.clicker.List"/>
</application>
</manifest>
The error is being displayed after the first line.
I'm attempting to integrate an ad-service 'Revmob' to my android-application. I've looked for an answer all over the internet..but just can't find a solution. Please help.
Thank you.
Put your uses-permission line after uses-sdk that is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pilot.clicker"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<!-- Required -->
<uses-permission android:name="android.permission.INTERNET"/>
Also try to clean your project go to project menu (if you are using eclipse) and clean your project and re-run it. Might be this will resolve your issue.
I am learning Android Development and got this error in AndroidMainfest.xml
The markup in the document following the root element must be well-formed. styles.xml
The codes below is generated automatically.
Original
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.incomeexp"
android:versionCode="1"`enter code here`
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.incomeexp.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Added
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
<application>
<activity android:name=".DisplayMessageActivity"
android:label="#string/title_activity_display_message"
android:parentActivityName="com.example.incomeexp.MainActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.incomeexp.MainActivity" />
</activity>
</application>
</manifest>
Remove the one added. Have the below . Check your package name in manifest and activities. Clean and build
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.incomeexp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.incomeexp.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".DisplayMessageActivity"
android:label="#string/title_activity_display_message"
android:parentActivityName="com.example.incomeexp.MainActivity">
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.incomeexp.MainActivity" />
</activity>
</application>
</manifest>
I was using Eclipse when it said that my version 10 SDK needs to be upgraded to above 17, so I upgraded to the latest vestion on SDK tools version 19.
Now when I go to AndroidManifest.xml it throws errors on these 2 lines below.
<uses-sdk android:targetSdkVersion="3" android:minSdkVersion="4"></uses-sdk>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
THE COMPLETE AndroidManifest.xml code is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.golf"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Activity1"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activity2"></activity>
</application>
<uses-sdk android:targetSdkVersion="3" android:minSdkVersion="4"></uses-sdk>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>
Can you help? what am I doing wrong? It was working perfectly on v10.
The issue is you have mentioned
uses-sdk android:targetSdkVersion android:minSdkVersion
two times in manifest.xml.One before application tag and one after
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.golf"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Activity1"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activity2"></activity>
</application>
<uses-sdk android:targetSdkVersion="3" android:minSdkVersion="4"></uses-sdk> <-- Remove this
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>