Android - Forcing ANR for testing purpose

后端 未结 6 1128
花落未央
花落未央 2020-12-16 03:42

Why i can\'t force Android ANR with this code? No log messages or pop up. The application is just launched lazily.

[UPDATE]

I can\'t get it even sleeping a V

6条回答
  •  忘掉有多难
    2020-12-16 04:20

    I've been facing the same issue yesterday, and I've found out that using a plain debug build ANR dialogs simply won't show up. (Although the UI thread was completely hanged.)

    But after exporting and properly signing the application the dialogs were popped up properly (in every cases mentioned above). However I am still not sure what really prevents to pop up ANR messages, maybe someone else can clarify this later...

提交回复
热议问题