Gettin error installing io.appium.uiautomator2

That’s a known limitation feature of Android OS. It has a hardcoded limit of 10_000 installs (it creates a unique application user for each install with a unique UID). After this limit expires it shows the above error message, where the error code itself is very confusing, but the second part does make sense, and basically means the limit of 10000 installs has expired, so the OS cannot assign a new user UID to any newly installed app.

The only known workaround is to reboot the phone. Also, since Android OS only creates a new user if a full app reinstall happens (e.g. uninstall and then install), then it makes sense to avoid uninstalling apps on a regular basis. Instead, one may consider to clear their data or perform reinstall/upgrade with -r option enabled.

2 Likes