利用AndroidStudio的lint清理无用资源



性能分析:在Application中的onCreate加入
// 分别为MainThread和VM设置Strict Mode
if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.detectResourceMismatches()
.detectCustomSlowCalls()
.penaltyLog()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectLeakedSqlLiteObjects()
.detectLeakedClosableObjects()
.detectLeakedRegistrationObjects()
.detectActivityLeaks()
.penaltyLog()
.build());
}
网友评论