报错
鸿蒙第一次点Preiewer报错:preview failed.unable to start the previewer.Open PrevireerLog to check for details
.File—>Settings->hvigor->取消勾选最后一个 Enable。。。tasks
安装完模拟器报错,版本不一致
$ hdc shell bm install -p /sdcard/0c8f57dbe2ef46d481446d6fe0e1fdf2/
Failure[INSTALL_PARSE_FAILED_USESDK_ERROR]
$ hdc shell rm -rf /sdcard/0c8f57dbe2ef46d481446d6fe0e1fdf2
Error while Deploying HAP
https://blog.csdn.net/weixin_39101959/article/details/125830055
在build.profile.json5文件中可以看到版本
国际化加入两种语言时 没有在base目录中也加入相同的 因为 在en_US,zh_CN目录都找不到的情况下回去base目录中找
width is translated here but not found in the default locale.
NAN input全删会出现
进行判断 isNAN()之后赋值或者return
突然不能预览
清除entry下的.perview文件 清除缓存
https://blog.csdn.net/weixin_42277946/article/details/135340745
路由
路径开头一定不要加 / !!!!!!!!!!!!
03-11 14:45:08.314 20292-15752 E C03900/Ace: [manifest_router.cpp(GetPagePath)-(0)] [Engine Log] can't find this page
03-11 14:45:08.314 20292-15752 E C03900/Ace: [page_router_manager.cpp(StartPush)-(0)] [Engine Log] this uri not support in route push.
03-11 14:45:08.314 20292-15752 I A0c0d0/JSApp: app Log: 路由失败,errCode:100002 errMessage:Uri error. The uri of router is not exist.
路径出错
没有在 resources->base->profile->main_pages.json中添加自己的页面
或者创建页面的时候直接new -> page 不要new ArkTS file
一定要把跳转之前所在的页面和要跳转的页面都加到 main_pages.json 文件中
模拟器
$ hdc shell bm uninstall com.example.myapplication
[ERROR_GET_BUNDLE_INSTALLER_FAILED]
Troubleshooting guide
$ hdc file send E:\HarMonyos\demo\entry\build\default\outputs\default\entry-default-unsigned.hap /sdcard/1b20c474cc1e4c138525af453cca2122/entry-default-unsigned.hap
Error while Deploying HAP
清除手机模拟器上的数据
在运行真机之前需要对app进行签名。
https://www.jianshu.com/p/dcd50d555eae
noDevices
添加了模拟器但是没有显示设备,开启模拟器重启IDE
开启模拟器之后没有找到自己的应用
开启模拟器运行代码
不同Ability之间跳转
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log]Lifetime: 0.000000s
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log]Js-Engine: ark
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log]page: pages
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log]Error message: Cannot read property startAbility of undefined
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log]SourceCode:
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log] this.context.startAbility(want);
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log] ^
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log]Stacktrace:
03-12 10:13:36.045 23468-14540 E C03900/Ace: [Engine Log] at anonymous (entry
这个还为解决