Android Studio Installs Multiple Versions of the App (Debugging)

675 views Asked by At

When I am debugging my Android App, I see multiple apps of it installed on my device, each one seems to be of an holder version. This is really annoying because most are bugged and crash on launch. Anyway I can have Android studio just install the current version.

I've tried to uninstall all the app (uninstalling one uninstalls them all) and re-launching it and It adds them back. I am debugging, not building APK's.

Thank you.

3

There are 3 answers

1
Ivan_Stepul On

Try deleting the old not working project folders.

0
Akhilesh On

I believe there could be various reasons for multiple installation of app during debug. I also faced similar issue once for one of my app and I after a thorough analysis I found AndroidManifest.xml was the culprit, though it was my mistake as at some point while adding and testing multiple activities I defined two of the activities as launcher activities and hence it was creating two instances of the app when I was debugging.

Check if in your case too, you have defined multiple activities as launcher activities. Following code part should only exist for your actual launcher activity which you want to launch when you app starts.

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

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

Are you accidentally building and deploying multiple flavours? How does your modules .gradle file look like?

Edit: you might want to check this: https://stackoverflow.com/a/27633032/3540885 (Have you set up more than one activity to be launched at start?)