在非 Activity 中使用 startActivity:Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
问题描述
在 APP 1 中启动 APP 2 中的 Activity。
|
|
错误提示信息:
Caused by: Android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?