unhandled promise rejection

在react-native项目中出现这个问题

解决办法:

requestPerssion()
        .then(_=>{
            this.initRecognizer();
        })
        .catch(e=>{})

把 .catch(e=>{}) 加上就好了

posted @ 2020-07-13 12:04  野鸡码农  阅读(3212)  评论(0)    收藏  举报