Y.S*_*Y.S 6 android android-install-apk android-multiple-users
When I run my app from Android Studio and install it on the primary user on a device, I notice that it gets installed on the secondary user as well.
In the first place, why is this happening? The android:requiredForAllUsers flag is false by default, and in any case can only be used by system apps or pre-installed apps.
Or is it the case that this happens only for debug-mode apps installed via Android Studio?
How can I prevent this from happening?
It is critical for my app that it be installed on one user only. I have already read the following documents:
Neither of those documents has any explanation of whether and how the installation process is affected by the multi-user feature.
There must surely be some manifest or build setting that permits or prevents installation on multiple users. Why isn't it easier to find? And why isn't this question more common on SO?
您不会阻止它,您会做您需要做的事情:在这种情况下,它将定义您的运行配置,以便该应用程序仅安装在您想要的位置,因为默认情况下它会安装在我认为的任何地方。您可以通过指定标志--user user_id来完成此操作。您可以使用adb shell pm list users获取 id
参考:Android Studio 2.3.2 在目标设备上的工作配置文件或其他用户帐户下启动应用程序将导致崩溃
| 归档时间: |
|
| 查看次数: |
1085 次 |
| 最近记录: |