android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
java.lang.ClassCastException: com.mosjoy.lawyerapp.MyApplication cannot be cast to android.app.Activity
最近有时在adapter中启动一个activity时,总是会出现这上面的错误!发现最好的解决办法是,传入对象时要传类名的形式!
如:CenterInfoAdapter adapter = new CenterInfoAdapter(CenterInfoActivity.this, dataList);
这样就行了!希望遇到同样问题的你也可以参考一下!