StrictMode disk read violation on empty activity's setContentView
问题 I've recently tried to use StrictMode but got a weird violation, so I tried setting up a new 'Empty Activity' project (in Android Studio ) and added an Application class as follows (as described in here): public class TestApplication extends Application { @Override public void onCreate() { setStrictMode(); super.onCreate(); } private void setStrictMode() { if (BuildConfig.DEBUG) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectAll() .penaltyLog() .build()); StrictMode