android 为什么我往源码里添加了一些Log,但没有打印出来?控制台输出也不行
PHP中文网
PHP中文网 2017-04-17 18:01:20
0
5
357

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

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

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(5)
Ty80

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. . .

巴扎黑

Restart genymotion and studio and try it

Ty80

Check to see if there are no selection conditions

or try unplugging and plugging in the USB

大家讲道理

Studio sometimes does not print out the Log, try Toast

洪涛

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template