美文网首页
2018-07-31 RN 0.52.0以后版本不能使用chro

2018-07-31 RN 0.52.0以后版本不能使用chro

作者: AndroidTalent | 来源:发表于2018-07-31 17:09 被阅读0次

    RN0.52版本后,开启remote debug后, chrome会显示报错,类似

    Failed to load http://192.168.0.105:8081/index.delta?platform=ios&dev=true&minify=false: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8081' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

    或者

    Failed to load http://localhost:8081/index.delta?platform=ios&dev=true&minify=false: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.0.105:8081' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

    ,程序不能正常运行!

    解决方法是,安装chrome插件“Allow-Control-Allow-Origin”,之后就正常了,吼吼!

    参考文献:

    Remote debug CORS issue · Issue #18006 · facebook/react-native · GitHub

    相关文章

      网友评论

          本文标题:2018-07-31 RN 0.52.0以后版本不能使用chro

          本文链接:https://www.haomeiwen.com/subject/rhbhvftx.html