Would this multi-touch work? - android

So I was just messing with my android manifest file, and somehow I forgot what I did, and I messed something up.
so the error it is showing in eclipse is this
Element type "application" must be followed by either attribute specifications, ">" or "/>".
and I think because of that my R.java file is gone too...
If someone could find that mistake, I'd bow to them
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zunairgames.zunair"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
<activity
android:name=".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=".GFXSurface"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.zunairgames.zunair.GFXSURFACE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>

The application tag lacks a > at the end.
It should be like this:
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >

Related

/MyFirstApp/AndroidManifest.xml: Element type "activity" must be followed by either attribute specifications, ">" or "/>"

I messed up the xml file while making googles example myfirstapp with an actionbar. Please help. I am a n00b. Here is the full code for the xml file.
<uses-sdk
android:minSdkVersion="16"
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
android:name=".DisplayMessageActivity"
android:label="#string/title_activity_display_message"
android:parentActivityName="com.myfirstapp.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.myfirstapp.MainActivity" />
</activity>
</application>
</manifest>
You're missing a closing </activity> for the first activity, it looks like. And the opening xml declarations:
<?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="<your package>"
android:versionCode="1"
android:versionName="dev">
...
Check out the docs on the Manifest: http://developer.android.com/guide/topics/manifest/manifest-intro.html

how to add an activity to the android manifest

How do I add:
<activity
android:name=".MainActivity2"
android:label="#string/title_activity_main">
</activity>
into the AndroidManifest.xml
which currently looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bac"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<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>
I'm fairly new to android programming and have yet to figure out a lot of stuff about transferring between pages and other things like that. Thanks for any help you give!
Just Add another Activity tag under your application tag
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bac"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<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>
<activity
android:name=".MainActivity2"
android:label="#string/title_activity_main">
</activity>
</application>
</manifest>
If you are new to android and trying to understand about manifest
Have a look at ANDROID-DEVELOPERS-SITE ..... Click here
Have a look at youtube-tutorial too hope this helps
It has all the information you need to get started knowing more about the manifest file
You need to add your Activity inside Application tag.
The activity is the child node of the application node. The multiple activities can specify by multiple nodes of activity.
Read this : manifest-intro
your manifest will be look like
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bac"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<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>
<!-- Add your activities here -->
<activity
android:name=".MainActivity2"
android:label="#string/title_activity_main">
</activity>
</application>
</manifest>
you can add any number of activity inside your application tag in AndroidManifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bac"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<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>
<!-- activity goes here-->
<activity
android:name=".MainActivity2"
android:label="#string/title_activity_main">
</activity>
</application>
</manifest>
to add an activity to the Manifest , just copy the content of the exesting activity in the manifest and remove the intent filter like this
---the original
<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>
---the new
<activity
android:name=".yourNewActivityName"
android:label="#string/app_name" >
</activity>
you need add this in the application tag.
you need to change the android:name property to your new activity's name

Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED any suggestions

** everyone with the same question has specific problems none of the have worked for me i've had more problems making this project than any other i've had.**
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.BinaryRelics"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="20" />
im pretty sure that the problem is somewhere between here and my last intent filter line
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Homescreen"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.BinaryRelics.Arcademode"
android:label="#string/title_activity_arcademode"
android:parentActivityName="com.BinaryRelics.Homescreen" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.BinaryRelics.Homescreen" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data>
</meta-data>
</activity>
</application>
</manifest>

Eclipse - .apk throwing out <activities>

Have a simple app with 2 activities. Works on USB / SYNC, but when I export it to get an .apk file, Mainfest.xml throws out any reference to the 2nd .
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.easy"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".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=".StartingPoint" android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.easy.STARTINGPOINT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
The 1st activity (.Splash) gets deleted during compile. I've had this problem with my first project so I started over with a very simple one to see if its a continuing problem or my first project.
Seems to be a continuing problem.

Android: No Launcher activity found, no problems in Manifest

Here's my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fionaheiss.shovelshovel"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:label="DisplayMap"
android:name="com.seanheiss.shovelshovel.DisplayMap"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:configChanges="keyboard|keyboardHidden|orientation" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I've tried the "name" field as above and just as ".DisplayMap". It is definitely spelled correctly. Could it be because I'm using Slick2D? The file DisplayMap.java extends BasicGame from the Slick2D engine, and has a main method. Maybe it's not an actual activity or something, but I'm not sure.
Any ideas? Thank you very much!
You forgot to close the Activity tag:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:label="DisplayMap"
android:name="com.seanheiss.shovelshovel.DisplayMap"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:configChanges="keyboard|keyboardHidden|orientation" > // Also fix this here
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> // <-- here
</application>
Good Morning,
You have to close the <activity> tag after the <intent-filter>
<activity >
<intent-filter>
-------------------
------------------
</intent-filter>
</activity>

Categories

Resources