日常开发Exception总结

  1. 小米手机调试运行到断点的地方就断开连接,app重启
    Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'
    解决:把所有的断点全部去掉
    Run –> View Breakpoints,将 “Java Line Breakpoints”选中删掉即可

    delete breakpoints.png

    原因(猜测):按照Stack Overflow的说法,貌似是安卓7.0系统的问题,如果开着InstantRun模式,并且在debug之前就存在断点,就无法进入调试模式。

  2. Instant Run的时候报错IOException:Failed to find byte code for android/app/FragmentManager$FragmentLifecycleCallbacks
    解决:将Enable Instant Run to hot swap code/resource changes on deploy(default enabled)的勾选取消即可,如下图


    Instant Run设置.png

你可能感兴趣的:(日常开发Exception总结)