Skip to content

android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? #109

Description

@shaziln

image
如果context 不是 Activity类型,需要添加FLAG_ACTIVITY_NEW_TASK,否则会无法跳转

Activity

  1. leobert-lan commented on Jun 7, 2018

    @leobert-lan
    Contributor

    下个版本会开放一个decorator提供对intent的装饰

  2. leobert-lan commented on Jun 7, 2018

    @leobert-lan
    Contributor

    sorry,会在JIMU项目中提供,DDAndroidComponent这边不再提交PR

  3. xiaojinzi123 commented on May 4, 2019

    @xiaojinzi123

    image
    如果context 不是 Activity类型,需要添加FLAG_ACTIVITY_NEW_TASK,否则会无法跳转

    建议使用 Component,这个很久不维护了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions