How to avoid the ANR dialog Application Not Responding

后端 未结 3 1419
我寻月下人不归
我寻月下人不归 2021-01-03 13:38

I\'m working on an Android app, which uses an online service, which I need to load my Fragments. Basically, I have a menu, and each button replaces a Fragment underneath. Wh

3条回答
  •  迷失自我
    2021-01-03 13:43

    Never execute a database operation or content provider operation in the context of the main thred. sooner or later you will be running into application Not Responding errors. the ANRs are not a good practice.

提交回复
热议问题