A mind map is drawn for Android Anr problems, and the causes, positioning, solutions and tools used are sorted out. If there is any improper or imperfect place, please leave a message for criticism and advice. Thank you very much!
Download the original PDF file
More illustrations articles, including mind maps, can be downloaded from the Github repository
@override public void onCreate() {super.oncreate (); / / MainThread and VM setting Strict Mode respectively the if (BuildConfig. DEBUG) {StrictMode. SetThreadPolicy (new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites() .detectNetwork() .detectResourceMismatches() .detectCustomSlowCalls() .penaltyDeath() .build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectLeakedSqlLiteObjects() .detectLeakedClosableObjects() .detectLeakedRegistrationObjects() .detectActivityLeaks() .penaltyDeath() .build()); }}Copy the code