可以使用resourceManager.getStringByNameSync方法。let context: Context = getContext(this); let msg: string = context.resourceManager.getStringByNameSync("EntryAbility_desc"); console.log(msg);参考文档: https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-resource-manager-V5\#getstringbynamesync10
可以使用resourceManager.getStringByNameSync方法。
参考文档: https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-resource-manager-V5\#getstringbynamesync10