错误内容:android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
原因:使用Activity的startActivity()没有限制,但是context的startActivity()就需要重新添加一个线程
解决方案:添加
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
标识开启一个新的线程
我的QQ群:373643359,欢迎加入
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context re