Android4.4, extents PreferenceActivity, Runtime Exception 解决办法。
在Android4.4中,如果一个class继承自PreferenceActivity。执行startActivity跳转到该类时,会报运行时错误:Caused by: java.lang.RuntimeException: Subclasses of PreferenceActivity must override isValidFragment(String) to verify that the Fragment class is valid!
解决办法时重写isValidFragment方法
@Override
protected boolean isValidFragment(String fragmentName) {
return true;
}