Egert Konsa
Egert Konsa

Reputation: 11

Android Manifest Attribute "name" File Error

I was following the Dev guide on Vunglee: https://github.com/Vungle/vungle-resources/blob/master/English/Android/3.2.x/android-dev-guide.md

Eclipse gives me this error in my manifest file

Attribute "name" bound to namespace "http://schemas.android.com/apk/res/android" was already specified for element "activity".

My code is :

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

<uses-sdk
    android:minSdkVersion="5"
    android:targetSdkVersion="19" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

    <activity
        android:name="com.kilobolt.ZombieBird.MainActivity"
        android:name="com.vungle.publisher.FullScreenAdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

</manifest>

Please help me, what is the problem. And i'm newbie in java.

Upvotes: 1

Views: 1905

Answers (2)

Shvet
Shvet

Reputation: 1201

Do not use same tag to declare two Activity in AndroidManifest file, Make 2 different tag to declare it like this:

 <activity  android:name="com.kilobolt.ZombieBird.MainActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
</activity>
<activity android:name="com.vungle.publisher.FullScreenAdActivity" 
            android:configChanges="keyboardHidden|orientation|screenSize">
</activity>

Upvotes: 1

TechHelper
TechHelper

Reputation: 821

can't give two names to same activity. Error is in below lines

 android:name="com.kilobolt.ZombieBird.MainActivity"
    android:name="com.vungle.publisher.FullScreenAdActivity"

As kalyan pvs mentioned in comment, check for other duplicate attributes also.

Upvotes: 3

Related Questions