Daniela Morais
Daniela Morais

Reputation: 2237

Why the App is installed twice?

When I run the Android App Studio, the cell is the App is "installed" twice: There are two apps one called "SplashScreenActivity" and other "Doctor Quiz" (my app), the two are equal. If I uninstall one, the other also uninstalls.
Why does this happen? How do I "install" just my app? (DoctorQuiz)

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.morais.daniela.doctorquiz" >
    <uses-permission android:name="android.permission.INTERNET"/>
    <provider android:authorities="com.facebook.app.FacebookContentProviderXXXX"
        android:name="com.facebook.FacebookContentProvider"
        android:exported="true" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/medicine_box_icon2"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
        <activity
            android:name=".Activity.SplashScreenActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/title_activity_splash_screen"
            android:theme="@style/FullscreenTheme">
        <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
        </activity>
        <activity
            android:name=".Activity.QuestionsActivity"
            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=".Activity.ResultActivity"
            android:label="@string/title_activity_result" >
            <activity android:name="com.facebook.FacebookActivity"
                android:configChanges=
                    "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
                android:theme="@android:style/Theme.Translucent.NoTitleBar"
                android:label="@string/app_name" />
        </activity>

    </application>

</manifest>

Screenshot
enter image description here

Upvotes: 27

Views: 15490

Answers (2)

amitsatputecd7
amitsatputecd7

Reputation: 361

Most probably you have specified two activities as launcher in manifest file. This invokes this issue.

Launcher specification appearing twice here

change it to

Corrected specification

Upvotes: 7

CommonsWare
CommonsWare

Reputation: 1006584

The app is not installed twice. You are not looking at apps. You are looking at launchable activities, ones with this <intent-filter>:

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

You have two activities with that <intent-filter>, and so you will have two activities in the home screen launcher. If you do not want both of those activities in the home screen launcher, remove that <intent-filter> from one of them.

Upvotes: 82

Related Questions