c***@hotmail.com
c***@hotmail.com
  • 发布:2022-02-20 00:37
  • 更新:2022-11-02 16:22
  • 阅读:1814

MAC版本的HBuilderX 开发uniapp 运行到Android模拟器一直失败

分类:uni-app

我是新买的macbook,想在电脑上使用ios和安卓的模拟器,ios的启动无问题,安卓模拟器使用的是android studio开发工具里安装的Pixel 2 API 32的模拟器,然后一直都无法吧app放在模拟器里调试。求解决

21:38:59.179 项目 'uniapp-zhls' 开始编译...
21:38:59.772 编译器版本:3.3.11
21:38:59.777 请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不及发行模式。
21:38:59.848 正在编译中...
21:39:01.799 DONE Build complete. Watching for changes...
21:39:01.804 项目 'uniapp-zhls' 编译成功。
21:39:02.083 正在建立手机连接...
21:39:02.105 正在安装手机端自定义基座...
21:39:02.295 /Users/xxx/workspace/uniapp-zhls/unpackage/debug/android_debug.apk: 1 file pushed. 152.9 MB/s (11464692 bytes in 0.072s)
21:39:02.340 avc: denied { read } for scontext=u:r:system_server:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=0
21:39:02.365 System server has no access to read file context u:object_r:fuse:s0 (from path /sdcard/android_debug.apk, context u:r:system_server:s0)
21:39:02.389 Error: Unable to open file: /sdcard/android_debug.apk
21:39:02.414 Consider using a file under /data/local/tmp/
21:39:02.439 Error: Can't open file: /sdcard/android_debug.apk
21:39:02.459 Exception occurred while executing 'install':
21:39:02.480 java.lang.IllegalArgumentException: Error: Can't open file: /sdcard/android_debug.apk
21:39:02.502 at com.android.server.pm.PackageManagerShellCommand.setParamsSize(PackageManagerShellCommand.java:572)
21:39:02.526 at com.android.server.pm.PackageManagerShellCommand.doRunInstall(PackageManagerShellCommand.java:1337)
21:39:02.551 at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:1303)
21:39:02.573 at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:193)
21:39:02.604 at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
21:39:02.615 at android.os.ShellCommand.exec(ShellCommand.java:38)
21:39:02.636 at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:24742)
21:39:02.659 at android.os.Binder.shellCommand(Binder.java:950)
21:39:02.682 at android.os.Binder.onTransact(Binder.java:834)
21:39:02.704 at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4818)
21:39:02.725 at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:8839)
21:39:02.747 at android.os.Binder.execTransactInternal(Binder.java:1184)
21:39:02.773 at android.os.Binder.execTransact(Binder.java:1143)
21:39:02.798 Performing Streamed Install
21:39:02.818 注:有些手机需要点亮手机屏幕并点击【安装】按钮才能安装成功
21:39:02.842 /Users/xxx/workspace/uniapp-zhls/unpackage/debug/android_debug.apk: 1 file pushed. 252.1 MB/s (11464692 bytes in 0.043s)
21:39:02.867 avc: denied { read } for scontext=u:r:system_server:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=0
21:39:02.892 System server has no access to read file context u:object_r:fuse:s0 (from path /sdcard/android_debug.apk, context u:r:system_server:s0)
21:39:02.915 Error: Unable to open file: /sdcard/android_debug.apk
21:39:02.939 Consider using a file under /data/local/tmp/
21:39:02.964 Error: Can't open file: /sdcard/android_debug.apk
21:39:02.986 Exception occurred while executing 'install':
21:39:03.010 java.lang.IllegalArgumentException: Error: Can't open file: /sdcard/android_debug.apk
21:39:03.033 at com.android.server.pm.PackageManagerShellCommand.setParamsSize(PackageManagerShellCommand.java:572)
21:39:03.058 at com.android.server.pm.PackageManagerShellCommand.doRunInstall(PackageManagerShellCommand.java:1337)
21:39:03.080 at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:1303)
21:39:03.102 at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:193)
21:39:03.124 at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
21:39:03.145 at android.os.ShellCommand.exec(ShellCommand.java:38)
21:39:03.168 at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:24742)
21:39:03.193 at android.os.Binder.shellCommand(Binder.java:950)
21:39:03.218 at android.os.Binder.onTransact(Binder.java:834)
21:39:03.240 at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4818)
21:39:03.265 at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:8839)
21:39:03.290 at android.os.Binder.execTransactInternal(Binder.java:1184)
21:39:03.313 at android.os.Binder.execTransact(Binder.java:1143)
21:39:03.338 Performing Streamed Install
21:39:03.381 /Users/xxx/workspace/uniapp-zhls/unpackage/debug/android_debug.apk: 1 file pushed. 235.8 MB/s (11464692 bytes in 0.046s)
21:39:03.390 avc: denied { read } for scontext=u:r:system_server:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=0
21:39:03.404 System server has no access to read file context u:object_r:fuse:s0 (from path /sdcard/android_debug.apk, context u:r:system_server:s0)
21:39:03.428 Error: Unable to open file: /sdcard/android_debug.apk
21:39:03.453 Consider using a file under /data/local/tmp/
21:39:03.477 Error: Can't open file: /sdcard/android_debug.apk
21:39:03.501 Exception occurred while executing 'install':
21:39:03.522 java.lang.IllegalArgumentException: Error: Can't open file: /sdcard/android_debug.apk
21:39:03.547 at com.android.server.pm.PackageManagerShellCommand.setParamsSize(PackageManagerShellCommand.java:572)
21:39:03.572 at com.android.server.pm.PackageManagerShellCommand.doRunInstall(PackageManagerShellCommand.java:1337)
21:39:03.597 at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:1303)
21:39:03.621 at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:193)
21:39:03.646 at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
21:39:03.669 at android.os.ShellCommand.exec(ShellCommand.java:38)
21:39:03.694 at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:24742)
21:39:03.715 at android.os.Binder.shellCommand(Binder.java:950)
21:39:03.739 at android.os.Binder.onTransact(Binder.java:834)
21:39:03.768 at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4818)
21:39:03.783 at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:8839)
21:39:03.806 at android.os.Binder.execTransactInternal(Binder.java:1184)
21:39:03.830 at android.os.Binder.execTransact(Binder.java:1143)
21:39:03.852 Performing Streamed Install
21:39:03.877 安装自定义基座App失败请使用手机助手手动安装/Users/xxx/workspace/uniapp-zhls/unpackage/debug/android_debug.apk到手机上,并重新运行真机调试。
21:39:03.900 已停止运行...

2022-02-20 00:37 负责人:无 分享
已邀请:
FullStack

FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866

支持的CPU类型,全部钩上

  • c***@hotmail.com (作者)

    都钩选了,并不好用

    2022-02-20 18:28

  • youzhuxiaoyao

    请问这个在哪里勾选,能否发一张截图

    2022-11-02 16:11

  • 1***@qq.com

    勾选上了还是不行

    2022-11-03 10:53

v***@vip.qq.com

v***@vip.qq.com

请问解决了吗?我也是 android studio 的模拟器

  • v***@vip.qq.com

    x86去掉,其余两个都选上,试试。

    2022-05-26 13:32

  • 1***@qq.com

    回复 v***@vip.qq.com: 不行啊,还是这个错

    2022-11-03 10:54

2***@qq.com

2***@qq.com

请问题主后来解决了吗?我也遇到了一模一样的问题。

youzhuxiaoyao

youzhuxiaoyao

https://ask.dcloud.net.cn/question/156603?item_id=218224&rf=false
同样的问题,请问楼主解决了吗?搞这个搞了一天了,真心耗时耗力啊,还没有收获

该问题目前已经被锁定, 无法添加新回复