今天换个手机进行兼容性测试,遇到了如下问题:
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
定位显示是在Adapter调用数据过程中出现了问题:
加一行下列代码,便可解决:
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);