2016-01-22 82 views
0

我用iPhone 4和iPhone 6来测试一个非常简单的应用程序,如果有什么不正常的是我听键盘事件。有没有人有RN 0.18.0's Devtool的这个问题?

componentWillMount:function() { 
     StatusBarIOS.setHidden(true); 

     DeviceEventEmitter.addListener('keyboardDidShow',(frames)=>{ 
      console.log("keyboardDidShow frames: " + frames); 

     }); 
     DeviceEventEmitter.addListener('keyboardWillHide',(frames)=>{ 
      console.log("keyboardWillHide frames: " + frames); 
     }); 
    }, 

当我启动Devtool中,Chrome是完全与此消息,并不断到来。 有没有办法看到我的日志信息与这个无尽的警告。

Running application "Project18" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF 
YellowBox.js:57 jsSchedulingOverhead (-1766ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1769ms) should be positive 
3YellowBox.js:57 jsSchedulingOverhead (-1767ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1766ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1762ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1766ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1767ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1766ms) should be positive 
3YellowBox.js:57 jsSchedulingOverhead (-1767ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 
2YellowBox.js:57 jsSchedulingOverhead (-1769ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1764ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1769ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1767ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 
2YellowBox.js:57 jsSchedulingOverhead (-1769ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1766ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1767ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1769ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1765ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1767ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1770ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1769ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1735ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1769ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1767ms) should be positive 
YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 
2YellowBox.js:57 jsSchedulingOverhead (-1769ms) should be positive 
3YellowBox.js:57 jsSchedulingOverhead (-1768ms) should be positive 

回答

0

我有同样的问题。有点奇怪,他们反复向你展示这样的警告(没有上下文,也没有办法谷歌它,并找出如何解决它)。

我的“解决方案”不是解决方案,而是我只是禁用了警告。你可以找到犯规code here。所以,作为一个快速修复,你可以去node_modules/react-native/React/Modules/RCTTiming.m,找到违规行(对我来说,它是在187行),只是评论出来。

if (jsSchedulingOverhead < 0) { 
    // RCTLogWarn(@"jsSchedulingOverhead (%ims) should be positive", (int)(jsSchedulingOverhead * 1000)); 

    /** 
    * Probably debugging on device, set to 0 so we don't ignore the interval 
    */ 
    jsSchedulingOverhead = 0; 
} 

,直到你决定再次升级作出反应原住民它会解决这个问题。

这可能是值得关注的解决方案,实际上是解决问题而不是拍摄信使,但这应该让你备份和运行。

相关问题