美文网首页
React-native项目--bug

React-native项目--bug

作者: innkk | 来源:发表于2018-04-03 09:15 被阅读0次
     1.  Attempted to transition from state `RESPONDER_INACTIVE_PRESS_IN` to `RESPONDER_ACTIVE_LONG_PRESS_IN`, which is not supported.
    

    这是开启了Debug JS Remotely模式,关闭它就好了.(如果有文本信息要加入点击事件,请用TouchableOpacity包裹)

      2.React-Native Command run-android unrecognized.
    

    yarn add react-native-cli

      3.Could not connect to development server.
    

    将ios文件夹下的 AppDelegate.m 中的

    jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
    

    改为:

    jsCodeLocation = [NSURL URLWithString:@"http://127.0.0.1:8081/index.ios.bundle?platform=ios&dev=true"];
    

    4.react-native ios请求http图片不显示

    用xcode打开Info.list 添加Allow Arbitrary Loads -> Yes

    相关文章

      网友评论

          本文标题:React-native项目--bug

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