t***@126.com
t***@126.com
  • 发布:2023-02-21 09:11
  • 更新:2023-08-02 17:34
  • 阅读:2329

真机调试一直处于 正在建立手机连接...

分类:HBuilderX

再真机调试的时候一直卡在 ”08:58:15.318 正在建立手机连接...“
mac系统下面的有这问题,换过三台mac,都是出现这个情况,win下面就正常的
标准基座跟自定义基座都是一样的问题
手机是三星s23 Android13```javascript

下面是日志

2023-02-21 08:57:51.627 [WARNING:] QLayout: Cannot add a null widget to QVBoxLayout/
2023-02-21 08:57:51.629 [WARNING:] QLayout: Attempting to add QLayout "" to ExtFormDialog "", which already has a layout
2023-02-21 08:57:51.630 [WARNING:] QLayout: Attempting to add QLayout "" to ExtFormDialog "", which already has a layout
2023-02-21 08:58:02.857 [WARNING:] [PluginHost] refreshListData: QJsonValue(object, QJsonObject({"checkedBaseIndex":1,"code":1,"device":{"name":"RFCW11K2N2X","platform":"android","runState":0,"runStateStr":"","udid":"RFCW11K2N2X","version":"13"},"userData":{"checkedBaseIndex":2,"cli":false,"platform":"android","runningDevices":[],"workspaceFolder":{"id":"{1fbb48fb-9982-4ec3-9463-0010de2c1bf1}","name":"flymanapp","nature":"UniApp_Vue","uri":{"$mid":1,"external":"file:///Users/tjurior/project/SynologyDrive/kaka/english-flying-man/flymanapp","fsPath":"/Users/tjurior/project/SynologyDrive/kaka/english-flying-man/flymanapp","path":"/Users/tjurior/project/SynologyDrive/kaka/english-flying-man/flymanapp","scheme":"file"}}}}))
2023-02-21 08:58:03.500 [INFO:] node "/Applications/HBuilderX.app/Contents/HBuilderX/plugins/node/node"
2023-02-21 08:58:03.500 [INFO:] args ("--max-old-space-size=2048", "--no-warnings", "/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/bin/uniapp-cli.js")
2023-02-21 08:58:15.413 [WARNING:] [PluginHost] Error Code (PluginHost): -32603
2023-02-21 08:58:15.414 [WARNING:] [PluginHost] Error Stack (PluginHost):
2023-02-21 08:58:15.414 [WARNING:] [PluginHost] Request plugin/invokeApi failed with message: Error: Command failed: /Applications/HBuilderX.app/Contents/HBuilderX/plugins/launcher/tools/adbs/adb -s RFCW11K2N2X shell pm list packages io.dcloud.HBuilder
2023-02-21 08:58:15.414 [WARNING:] [PluginHost]
2023-02-21 08:58:15.414 [WARNING:] [PluginHost] Exception occurred while executing 'list':
2023-02-21 08:58:15.414 [WARNING:] [PluginHost] java.lang.SecurityException: Shell does not have permission to access user 150
2023-02-21 08:58:15.414 [WARNING:] [PluginHost] com.android.server.am.ActivityManagerService.handleIncomingUser:14877 android.app.ActivityManager.handleIncomingUser:4802 com.android.server.pm.PackageManagerShellCommand.translateUserId:3499
2023-02-21 08:58:15.414 [WARNING:] [PluginHost] at com.android.server.am.UserController.handleIncomingUser(UserController.java:2672)
2023-02-21 08:58:15.414 [WARNING:] [PluginHost] at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:14877)
2023-02-21 08:58:15.414 [WARNING:] [PluginHost] at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4802)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3499)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:965)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:861)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:720)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:222)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at android.os.ShellCommand.exec(ShellCommand.java:38)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6992)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at android.os.Binder.shellCommand(Binder.java:1085)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at android.os.Binder.onTransact(Binder.java:903)
2023-02-21 08:58:15.415 [WARNING:] [PluginHost] at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4909)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6976)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at android.os.Binder.execTransactInternal(Binder.java:1321)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at android.os.Binder.execTransact(Binder.java:1280)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost]
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at ChildProcess.exithandler (node:child_process:400:12)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at ChildProcess.emit (node:events:513:28)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at maybeClose (node:internal/child_process:1093:16)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at Socket.<anonymous> (node:internal/child_process:451:11)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at Socket.emit (node:events:513:28)
2023-02-21 08:58:15.416 [WARNING:] [PluginHost] at Pipe.<anonymous> (node:net:757:14)
2023-02-21 09:04:55.954 [WARNING:] QLayout: Cannot add a null widget to QVBoxLayout/
2023-02-21 09:04:55.955 [WARNING:] QLayout: Attempting to add QLayout "" to ExtFormDialog "", which already has a layout
2023-02-21 09:04:55.955 [WARNING:] QLayout: Attempting to add QLayout "" to ExtFormDialog "", which already has a layout
2023-02-21 09:07:12.067 [WARNING:] [PluginHost] Error Code (PluginHost): -32603
2023-02-21 09:07:12.067 [WARNING:] [PluginHost] Error Stack (PluginHost):
2023-02-21 09:07:12.067 [WARNING:] [PluginHost] Request plugin/invokeApi failed unexpectedly without providing any details.
2023-02-21 09:07:12.073 [WARNING:] [PluginHost] refreshListData: QJsonValue(null)

2023-02-21 09:11 负责人:无 分享
已邀请:

最佳回复

DCloud_HB_WDL

DCloud_HB_WDL

错误日志: Shell does not have permission to access user 150

MacOSX尝试解决方法

  1. Google developer网站,下载一个最新版的Android SDK。拷贝其中的adb文件路径
  2. 打开HBuilderX,菜单【设置】【运行设置】,自定义adb路径,设置为刚才下载的adb路径。
  3. 关闭HBuilderX。
  4. 打开活动监视器,杀死所有的adb进程。
  5. 重启HBuilderX
DCloud_HB_Gml

DCloud_HB_Gml

终端执行命令行

/Applications/HBuilderX.app/Contents/HBuilderX/plugins/launcher/tools/adbs/adb -s RFCW11K2N2X shell pm list packages io.dcloud.HBuilder

有报错吗

  • e***@163.com

    终端运行结果

    Exception occurred while executing 'list':

    java.lang.SecurityException: Shell does not have permission to access user 150

    com.android.server.am.ActivityManagerService.handleIncomingUser:14872 android.app.ActivityManager.handleIncomingUser:4802 com.android.server.pm.PackageManagerShellCommand.translateUserId:3499

    at com.android.server.am.UserController.handleIncomingUser(UserController.java:2672)

    at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:14872)

    at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4802)

    at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3499)

    at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:965)

    at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:861)

    at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:720)

    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:222)

    at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)

    at android.os.ShellCommand.exec(ShellCommand.java:38)

    at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6931)

    at android.os.Binder.shellCommand(Binder.java:1085)

    at android.os.Binder.onTransact(Binder.java:903)

    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4909)

    at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6915)

    at android.os.Binder.execTransactInternal(Binder.java:1321)

    at android.os.Binder.execTransact(Binder.java:1280)


    看下哪里的问题

    2023-02-22 09:43

BoredApe

BoredApe - 有问题就会有答案。

使用 adb连接试试(adb存放目录HbuilderX\plugins\launcher\tools\adbsadb kill-serve && adb devices

提供下操作系统、HBuilderX版本号、连接的手机设备信息。 Android设备,请确保开发者模式 usb调试已开启。 HBuilderX是通过adb命令来检测手机的。如果adb无法检测到手机,那么HBuilderX肯定无法检测到手机。 HBuilderX菜单【设置】【运行设置】,请确保填写的adb路径是有效的。
提供下运行日志(菜单【帮助 - 查看运行日志】,日志可以另存为txt,然后以附件形式发送给我们)。

  • t***@126.com (作者)

    你好, 使用adb也是一样的问题,设备是检测到了,就是运行的时候卡住了, 附件也上传了 ,只有在mac系统下面有问题,win系统下是正常的,是否可以帮忙看下 感谢感谢

    2023-02-21 10:48

  • DCloud_HB_WDL

    回复 t***@126.com: 什么项目?是特定某个项目出现问题?还是所有项目都不行?新建一个uni-app项目试试

    2023-02-21 12:06

  • t***@126.com (作者)

    回复 DCloud_HB_WDL: 是所有项目,也新建了一个HBuilder提供的默认模板,也一样的不行,一直卡在正在建立手机连接 (在运行的时候已经识别到设备了),adb devices 也能识别到


    12:26:53.858 项目 '111' 开始编译...


    12:26:55.116 3.7.2


    12:26:55.119 请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不及发行模式。


    12:26:55.234 正在编译中...


    12:26:58.057 项目 '111' 编译成功。


    12:26:58.104 正在建立手机连接...


    就是到这边走不下去了

    2023-02-21 12:31

e***@163.com

e***@163.com - 周全

一样,对解决方案保持关注

4***@qq.com

4***@qq.com

我也一样,同样的问题,安卓无法调试,头大

9***@qq.com

9***@qq.com

进设置,找到 安全文件夹->删除,然后运行到真机,就可以了。

  • 4***@qq.com

    安全文件夹找不到嘛,能具体一点不?

    2023-03-21 23:47

  • 9***@qq.com

    回复 4***@qq.com: 在设置里搜索“安全文件夹”

    2023-03-29 11:18

s***@foxmail.com

s***@foxmail.com

三星安全文件夹的原因,换模拟器就好了

  • 8***@qq.com

    感谢 真是卸载掉 安全文件夹就好了!手动@楼主

    2023-08-02 17:35

  • z***@126.com

    回复 8***@qq.com: 试了一下删除安全文件夹就好了,但之前HBuilderX是没这问题的,后来升级后就有这个问题了

    2023-12-26 09:15

8***@qq.com

8***@qq.com

同手机。问题一样。三星s23u。 华为就行 三星就一直连接中

要回复问题请先登录注册