pattyd
pattyd

Reputation: 6150

Error Parsing XML: Mismatched tag - Android strange error

I have just started Android Development, and I am trying to implement "Google Maps for Android API v2" in my app. I pretty much just want the map to show the device's location. So far, I can get the lat + long position, country, and city. Now, I just want to show that on a map. I am working in eclipse

So, I ran into an issue where I get a weird error that says

 Error Parsing XML: Mismatched tag

I have been troubleshooting my code for the past 2 hours, and cannot find out how the tag could possibly be mismatched (it is the closing </application> tag)

Here is my complete code:

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

    <uses-sdk
        android:minSdkVersion="18"
        android:targetSdkVersion="18" />
    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true"/>

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.dd.splash.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=".myMainScreen"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="com.tutorial.CLEARSCREEN" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".myMainScreen" android:label="@string/app_name"
     android:theme="@android:style/Theme.NoTitleBar"></activity>

        <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="KEY" />
    </application>
</manifest>

Any help, or suggestions are greatly appreciated!
Thank you :)

Upvotes: 2

Views: 1771

Answers (1)

pattyd
pattyd

Reputation: 6150

I just found out how to fix this. You can automatically clean up all formatting and errors within eclipse, by going to Project > Clean...
It's as simple as that :)

Upvotes: 1

Related Questions