在HarmonyOS NEXT开发中有办法在oncreate 里面通过getContext 拿到context吗?在uiability的oncreate方法getContext 返回undefined,直接获取this.context 正常 这个有办法在oncreate 里面通过getContext 拿到context吗
在HarmonyOS NEXT开发中有办法在oncreate 里面通过getContext 拿到context吗?在uiability的oncreate方法getContext 返回undefined,直接获取this.context 正常 这个有办法在oncreate 里面通过getContext 拿到context吗
该接口的起始调用不在当前页面,将可能导致无法跟踪到该实例的Context,则会返回undefined。https://developer.huawei.com/consumer/cn/doc/harmonyos-refere...