转自:http://my.eoe.cn/864234/archive/5162.html
1:Handler
1 |
// This Handler class should be static or leaks might occur: IncomingHandler |
解决方法:
1 |
private Handler mHandler = new Handler(new Handler.Callback() { |
警告原因:
2:SimpleDateFormat
1 |
// To get local formatting use getDateInstance(), getDateTimeInstance(), or |
解决方法:
1 |
SimpleDateFormat newSimpleDateFormat = new SimpleDateFormat( |
警告原因:
**3:new HashMap() **
1 |
@SuppressLint("UseSparseArrays") |
解决方法:
1 |
//TODO |
警告原因:Use new SparseArray(...) instead for better performance
4:"String".toUpperCase(); "String".toLowerCase();
1 |
@SuppressLint("DefaultLocale") |
解决方法:
1 |
boolean b = "String".equalsIgnoreCase("STRING"); |
警告原因:Implicitly using the default locale is a common source of bugs: Use toUpperCase(Locale) instead