Installing application and uninstalling does not remove completly - Android Studio
Asked Answered
C

2

6

I got a strange issue in few of my recent applications.

What I did:

  • Installing an application either directly using USB cable with Android Studio . Or downloading and installing signed APK through my local server.
  • Application works fine in all aspects
  • Uninstalling the application by long press and dragging the app icon to Uninstall icon
  • Or uninstalling through Settings -> Apps -> Uninstall by selecting the app

Problem:

  • After uninstall , under Settings -> Apps -> Still the app is shown as below

enter image description here

  • My application still shows in the list at the bottom with NOT INSTALLED FOR THIS USER message
  • I am not sure why this is happening. For majority of devices again downloading/installing new APK version from local server does not work unless I again uninstall by clicking on above list and goes to next screen as shown below.

enter image description here

  1. What might be causing this?
  2. Does any other developer faced same issue?

Android Studio Version : 2.1.3
Min SDK in Manifest : 17
Devices Tested : Nexus 4 , OnePlus 3 , Motorolla Gen-3 , Honor

Different Trials Made: Device is having only one user Owner

  1. Now I have uninstalled an application which was downloaded from App store. This was done successfully without giving an option again with NOT INSTALLED FOR THIS USER
  2. Again complete removal of my application and reinstalling is done. After this , I tried to uninstall again.The same options are shown for my application NOT INSTALLED FOR THIS USER
  3. Seems to be this is the issue with custom applications and not those installed from App Store. In-fact some steps which probably I am missing. Can anyone point out!!
Cupp answered 23/8, 2016 at 7:37 Comment(3)
tried removing using adb commands?Elson
This really seems like a flaw although the solution provided below works its an overhead. I mean whats the use of having multiple user accounts if these accounts are not independent this is a bad architecture. And since its android we just need to deal with this hack which is very annoying specially in development mode.Urogenous
Does not happen when we are directly downloading from App Store? I guess there is no need to go to second screen shown and uninstallCupp
D
7

In Android there is multiuser environment came from Android 4.2,

So when there are multiple user accounts present on the device, and if one user installs the app, it get's installed for all users.

Though when you uninstall it from your user, it's still present in other user.

So it shows that message:NOT INSTALLED FOR THIS USER

To solve this problem, there's are three ways, you can try any one feasible to you:
1. You need to login to that user environment and uninstall the app.
2. Uninstall for all users(you need to be admin user) Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
3. You can uninstall app for all users from PC using adb command: adb uninstall on command prompt/shell.

Danelledanete answered 23/8, 2016 at 7:40 Comment(1)
Thanks for the info. But why this does not happen when we are directly downloading from App Store? Or am I mistakenCupp
D
1

If you have multiple users on your device, which means that the apps are installed by another user,and while you uninstall app the default account is another than this issue occurs

Try this

  1. (from Owner account) Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.

  2. (from PC) Enter adb uninstall on command prompt/shell. This is the same as "uninstall for all users"

Difference answered 23/8, 2016 at 7:42 Comment(3)
Is the behavior same while using App Store?Cupp
yes ofcourse because multiuser environment is supported by android ,than same scenario while using playstore.Difference
On my phone, there are 5 items on the menu but none is saying "Uninstall for all users"! And I'm still unable to install and test my newly created signed apk. Any idea?Ailsun

© 2022 - 2024 — McMap. All rights reserved.