简体   繁体   English

无法在Samsung设备上的Android Studio 3.4.1中运行项目

[英]Cannot run project in Android Studio 3.4.1 on Samsung Devices

I am unable to run a project on my Samsung device from Android Studio 3.4.1. 我无法从Android Studio 3.4.1在三星设备上运行项目。 Studio is giving me the following error message in a dialog box Studio在对话框中给我以下错误消息

Installation failed with message 'cmd package install-create -r -t -S 1686629' returns error 'Unknown failure: Security exception: Permission Denial: runInstallCreate from pm command asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
java.lang.SecurityException: Permission Denial: runInstallCreate from pm command asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at com.android.server.am.UserController.handleIncomingUser(UserController.java:1827)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:25069)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4848)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:2402)
at com.android.server.pm.PackageManagerShellCommand.doCreateSession(PackageManagerShellCommand.java:2408)

I tried the fix mentioned in the message, ie adding a permission in manifest file, but still the error is not going away while running. 我尝试了消息中提到的修复程序,即在清单文件中添加权限,但是运行时错误仍然消失。

Please note, the project is building without errors. 请注意,该项目正在构建中,没有错误。

How do I fix this? 我该如何解决?

My System details 我的系统详细信息

Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic 发行者ID:Ubuntu说明:Ubuntu 18.04.2 LTS版本:18.04代号:bionic

Android Studio Details Android Studio详细信息

Android Studio 3.4.1 Build #AI-183.6156.11.34.5522156, built on May 1, 2019 JRE: 1.8.0_152-release-1343-b16-5323222 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains sro Linux 4.15.0-52-generic Android Studio 3.4.1 Build#AI-183.6156.11.34.5522156,建于2019年5月1日JRE:1.8.0_152-release-1343-b16-5323222 amd64 JVM:JetBrains sro Linux 4.15.0的OpenJDK 64位服务器VM -52泛型

I had the same issue after upgrading a Galaxy Tab Active 2 to Android Pie (9.0). 将Galaxy Tab Active 2升级到Android Pie(9.0)后,我遇到了同样的问题。

The solution that worked for me: 对我有用的解决方案:

  1. Uninstall the App 卸载应用
  2. Disable and Re-Enable Developer Options. 禁用并重新启用开发人员选项。
  3. Re-Enable USB Debugging (it didn't work after that step just yet) 重新启用USB调试(在该步骤之后,该调试仍然无效)
  4. Reboot the tablet 重新启动平板电脑

Others reported success by adding the the INTERACT_ACROSS_USERS_FULL permission into the manifest. 其他人则通过向清单添加INTERACT_ACROSS_USERS_FULL权限来报告成功。

If you're still stuck, other solutions steps regarding the same error message are available here: https://forum.unity.com/threads/android-permission-interact_across_users_full.536280/ 如果仍然遇到问题,可以在这里找到关于相同错误消息的其他解决方案步骤: https : //forum.unity.com/threads/android-permission-interact_across_users_full.536280/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM