Home  >  Q&A  >  body text

android 为什么我往源码里添加了一些Log,但没有打印出来?控制台输出也不行

我在原生VideoView的onMeasure方法中,添加了一些Log和在控制台输出的方法,如下图:

但都没有看到输出,用的是Genymotion测试。
之前,在网上搜到一个类似的提问,里面提了很多方面,感觉都有可能,但因为讲的都很简短,题主追问也没有再回答,所以来这里再问一下。希望能得到比较详细的答案,或者是研究方向。谢谢!!

PHP中文网PHP中文网2742 days ago339

reply all(5)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 18:03:20

    First of all, thank you everyone for your answers! I asked here and there, and the most likely answer I got was that by doing this, I only modified the source code in my development environment, but the source code on the phone or simulator did not change. So in order to print Log in the source code, it is estimated that we need to modify the running environment, that is, the source code in the mobile phone or simulator, but I feel that this is modifying the system. . .

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 18:03:20

    Restart genymotion and studio and try it

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 18:03:20

    Check to see if there are no selection conditions

    or try unplugging and plugging in the USB

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 18:03:20

    Studio sometimes does not print out the Log, try Toast

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 18:03:20

    Native?? You need to inherit videoview and rewrite the onMeasure method. Because you changed it in the source code, the source code you just changed will not be compiled when running

    reply
    0
  • Cancelreply