Happy
Happy

Reputation: 1071

App getting installed three times when run through usb debugging after converting my project to Android Studio

i just converted my eclipse project to android studio project and installed the studio build through the USB debugging.

and i got my app installed three times, if i clicks the first app it gets open the app and if i clicks other 2 apps its get force closed. how do i remove other two same app.

i got one url about this discussion not getting solved my problem

  http://stackoverflow.com/questions/12867455/android-app-gets-installed-3-times-when-ran-once-on-android-device

Upvotes: 0

Views: 76

Answers (2)

Happy
Happy

Reputation: 1071

Yes the problem is, my app imports two own libraries which is having main activities, i replaced the main activities from the two libraries. so now the problem getting solved... but in eclipse not like that i think...

Upvotes: 1

Virthuss
Virthuss

Reputation: 3213

Ensure your AndroidManifest.xml looks like this:

         ...
        <activity
            android:name=".SplashScreen"
            android:label="..."
            android:screenOrientation="portrait"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".MainActivity"
            android:label="..."
            android:theme="@style/theme">
            <!--android:label="@string/app_name" >-->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>

If you have three times

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

You will have three icons as well. Keep this for your main activity, the one you use to launch your app. Remove it for the others.

Upvotes: 1

Related Questions