computeValuesWithHarfbuzz -- need to force to single run

本文探讨了在子线程中遇到的UI更新问题,如computeValuesWithHarfbuzz需要强制单线程运行的情况,以及如何通过Handler机制解决子线程直接修改界面内容导致的错误。

computeValuesWithHarfbuzz  -- need to force to single run

或者

android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views

子线程不可以直接修改界面的内容,如果要修改界面可以利用消息机制Handler,将写在子线程的内容写到Handler中。具体可参考一下代码片段



翻译以下文档yarn install is used to install all dependencies for a project. This is most commonly used when you have just checked out code for a project, or when another developer on the project has added a new dependency that you need to pick up. If you are used to using npm you might be expecting to use or . These have been replaced by and . For more information, see the yarn add documentation.--save--save-devyarn addyarn add --dev Running with no command will run , passing through any provided flags.yarnyarn install If you need reproducible dependencies, which is usually the case with the continuous integration systems, you should pass flag.--frozen-lockfile yarn install Install all the dependencies listed within in the local folder.package.jsonnode_modules The file is utilized as follows:yarn.lock If is present and is enough to satisfy all the dependencies listed in , the exact versions recorded in are installed, and will be unchanged. Yarn will not check for newer versions.yarn.lockpackage.jsonyarn.lockyarn.lock If is absent, or is not enough to satisfy all the dependencies listed in (for example, if you manually add a dependency to ), Yarn looks for the newest versions available that satisfy the constraints in . The results are written to .yarn.lockpackage.jsonpackage.jsonpackage.jsonyarn.lock If you want to ensure is not updated, use .yarn.lock--frozen-lockfile yarn install --check-files Verifies that already installed files in did not get removed.node_modules yarn install --flat Install all the dependencies, but only allow one version for each package. On the first run this will prompt you to choose a single version for each package that is depended on at multiple version ranges. These will be added to your under a field.package.jsonresolutions "resolutions": { "package-a": "2.0.0", "package-b": "5.0.0", "package-c": "1.5.2" } yarn install --force This refetches all packages, even ones that were previously installed. yarn install --har Outputs an H
03-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值