Hbuildx运行app在模拟器

250 阅读1分钟

目前只用到了Android,就先写下安卓,ios后面用到再补充。
运行在模拟器,Android官方给出的是android studio,今天记录的也是android studio的教程。
官方参考:uniapp.dcloud.net.cn/tutorial/ru…

1、下载安装android studio(需要翻墙)
下载地址:developer.android.com/studio/inst…

image.png

image.png

选择phone的型号点next

image.png

修好名称后点击完成 image.png

创建好之后点击运行 image.png

在Hbuildx中运行

image.png

记得先把模拟器起起来再运行,不然会搜不到基座 image.png

image.png

这里提一下调试模式 image.png 就可以看到控制台的报错信息 image.png

顺便记录一下其他模拟器
运行在其他模拟器需要先配置hbuildx中adb路径 image.png

找到你的模拟器安装位置,软件-属性-打开文件所在位置 image.png

复制adb的路径到hbuildx中 image.png

image.png

端口号根据自己的模拟器去填对应的,不知道的可以网上搜 image.png

配置好再去运行,这时候就可以看到这个设备了,运行就可以

image.png image.png